Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
<
QtWidgets
/
private
/
qtwidgetsglobal_p
.
h
>
6
#
include
<
QtWidgets
/
qstyleplugin
.
h
>
7
#
include
<
QtCore
/
qoperatingsystemversion
.
h
>
8
#
include
"qwindowsvistastyle_p.h"
9
#
include
"qwindows11style_p.h"
10
11
QT_BEGIN_NAMESPACE
12
13
class
QModernWindowsStylePlugin
:
public
QStylePlugin
14
{
15
Q_OBJECT
16
Q_PLUGIN_METADATA(IID
"org.qt-project.Qt.QStyleFactoryInterface"
FILE
"modernwindowsstyles.json"
)
17
public
:
18
QStyle
*
create
(
const
QString
&
key
)
override
;
19
};
20
21
QStyle *
QModernWindowsStylePlugin
::create(
const
QString &key)
22
{
23
if
(key.compare(QLatin1String(
"windows11"
), Qt::CaseInsensitive) == 0)
24
return
new
QWindows11Style();
25
if
(key.compare(QLatin1String(
"windowsvista"
), Qt::CaseInsensitive) == 0)
26
return
new
QWindowsVistaStyle();
27
return
nullptr
;
28
}
29
30
QT_END_NAMESPACE
31
32
#
include
"main.moc"
QModernWindowsStylePlugin
Definition
main.cpp:14
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtbase
src
plugins
styles
modernwindows
main.cpp
Generated on
for Qt by
1.14.0