Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
src_corelib_global_qoperatingsystemversion.cpp
Go to the documentation of this file.
1
// Copyright (C) 2018 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4
#
include
<
QOperatingSystemVersion
>
5
6
void
example
()
7
{
8
//! [0]
9
bool
ios_higher_then_9 = QOperatingSystemVersion::current() >= QOperatingSystemVersion(QOperatingSystemVersion::IOS, 9);
10
//! [0]
11
12
//! [1]
13
auto
current = QOperatingSystemVersion::current();
14
if
(current >= QOperatingSystemVersion::OSXYosemite ||
15
current >= QOperatingSystemVersion(QOperatingSystemVersion::IOS, 8)) {
16
// returns true on macOS >= 10.10 and iOS >= 8.0, but false on macOS < 10.10 and iOS < 8.0
17
}
18
//! [1]
19
}
example
void example()
[5]
Definition
doc_src_groups.cpp:7
qtbase
src
corelib
doc
snippets
code
src_corelib_global_qoperatingsystemversion.cpp
Generated on
for Qt by
1.18.0