pub struct WinVersion(/* private fields */);
Expand description

This enum provides symbolic names for the various versions of the Windows operating system. On Windows, the QSysInfo::WindowsVersion variable gives the version of the system on which the application is run.

C++ enum: QSysInfo::WinVersion.

C++ documentation:

This enum provides symbolic names for the various versions of the Windows operating system. On Windows, the QSysInfo::WindowsVersion variable gives the version of the system on which the application is run.

MS-DOS-based versions:

NT-based versions (note that each operating system version is only represented once rather than each Windows edition):

Alternatively, you may use the following macros which correspond directly to the Windows operating system version number:

The following masks can be used for testing whether a Windows version is MS-DOS-based or NT-based:

See also MacVersion.

Member Function Documentation

Implementations§

source§

impl WinVersion

source

pub fn to_int(&self) -> c_int

source§

impl WinVersion

source

pub const WVNone: WinVersion = _

Operating system other than Windows. (C++ enum variant: WV_None = 0)

source

pub const WV32S: WinVersion = _

Windows 3.1 with Win 32s (C++ enum variant: WV_32s = 1)

source

pub const WV95: WinVersion = _

Windows 95 (C++ enum variant: WV_95 = 2)

source

pub const WV98: WinVersion = _

Windows 98 (C++ enum variant: WV_98 = 3)

source

pub const WVMe: WinVersion = _

Windows Me (C++ enum variant: WV_Me = 4)

source

pub const WVDOSBased: WinVersion = _

MS-DOS-based version of Windows (C++ enum variant: WV_DOS_based = 15)

source

pub const WVNT: WinVersion = _

Windows NT (operating system version 4.0) (C++ enum variant: WV_NT = 16)

source

pub const WV2000: WinVersion = _

Windows 2000 (operating system version 5.0) (C++ enum variant: WV_2000 = 32)

source

pub const WVXP: WinVersion = _

Windows XP (operating system version 5.1) (C++ enum variant: WV_XP = 48)

source

pub const WV2003: WinVersion = _

Windows Server 2003, Windows Server 2003 R2, Windows Home Server, Windows XP Professional x64 Edition (operating system version 5.2) (C++ enum variant: WV_2003 = 64)

source

pub const WVVISTA: WinVersion = _

Windows Vista, Windows Server 2008 (operating system version 6.0) (C++ enum variant: WV_VISTA = 128)

source

pub const WVWINDOWS7: WinVersion = _

Windows 7, Windows Server 2008 R2 (operating system version 6.1) (C++ enum variant: WV_WINDOWS7 = 144)

source

pub const WVWINDOWS8: WinVersion = _

Windows 8 (operating system version 6.2) (C++ enum variant: WV_WINDOWS8 = 160)

source

pub const WVWINDOWS81: WinVersion = _

Windows 8.1 (operating system version 6.3), introduced in Qt 5.2 (C++ enum variant: WV_WINDOWS8_1 = 176)

source

pub const WVWINDOWS10: WinVersion = _

Windows 10 (operating system version 10.0), introduced in Qt 5.5 (C++ enum variant: WV_WINDOWS10 = 192)

source

pub const WVNTBased: WinVersion = _

NT-based version of Windows (C++ enum variant: WV_NT_based = 240)

source

pub const WV40: WinVersion = _

Operating system version 4.0, corresponds to Windows NT (C++ enum variant: WV_4_0 = 16)

source

pub const WV50: WinVersion = _

Operating system version 5.0, corresponds to Windows 2000 (C++ enum variant: WV_5_0 = 32)

source

pub const WV51: WinVersion = _

Operating system version 5.1, corresponds to Windows XP (C++ enum variant: WV_5_1 = 48)

source

pub const WV52: WinVersion = _

Operating system version 5.2, corresponds to Windows Server 2003, Windows Server 2003 R2, Windows Home Server, and Windows XP Professional x64 Edition (C++ enum variant: WV_5_2 = 64)

source

pub const WV60: WinVersion = _

Operating system version 6.0, corresponds to Windows Vista and Windows Server 2008 (C++ enum variant: WV_6_0 = 128)

source

pub const WV61: WinVersion = _

Operating system version 6.1, corresponds to Windows 7 and Windows Server 2008 R2 (C++ enum variant: WV_6_1 = 144)

source

pub const WV62: WinVersion = _

Operating system version 6.2, corresponds to Windows 8 (C++ enum variant: WV_6_2 = 160)

source

pub const WV63: WinVersion = _

Operating system version 6.3, corresponds to Windows 8.1, introduced in Qt 5.2 (C++ enum variant: WV_6_3 = 176)

source

pub const WV100: WinVersion = _

Operating system version 10.0, corresponds to Windows 10, introduced in Qt 5.5 (C++ enum variant: WV_10_0 = 192)

source

pub const WVCE: WinVersion = _

C++ enum variant: WV_CE = 256

source

pub const WVCENET: WinVersion = _

C++ enum variant: WV_CENET = 512

source

pub const WVCE5: WinVersion = _

C++ enum variant: WV_CE_5 = 768

source

pub const WVCE6: WinVersion = _

C++ enum variant: WV_CE_6 = 1024

source

pub const WVCEBased: WinVersion = _

C++ enum variant: WV_CE_based = 3840

Trait Implementations§

source§

impl Clone for WinVersion

source§

fn clone(&self) -> WinVersion

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for WinVersion

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<WinVersion> for c_int

source§

fn from(value: WinVersion) -> Self

Converts to this type from the input type.
source§

impl From<i32> for WinVersion

source§

fn from(value: c_int) -> Self

Converts to this type from the input type.
source§

impl PartialEq for WinVersion

source§

fn eq(&self, other: &WinVersion) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Copy for WinVersion

source§

impl Eq for WinVersion

source§

impl StructuralEq for WinVersion

source§

impl StructuralPartialEq for WinVersion

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

source§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> StaticUpcast<T> for T

source§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.