Qt 6.x
The Qt SDK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
4#include <QtWidgets/private/qtwidgetsglobal_p.h>
5#include <QtWidgets/qstyleplugin.h>
7
9
11{
13 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QStyleFactoryInterface" FILE "windowsvistastyle.json")
14public:
15 QStyle *create(const QString &key) override;
16};
17
19{
20 if (key.compare(QLatin1String("windowsvista"), Qt::CaseInsensitive) == 0)
21 return new QWindowsVistaStyle();
22
23 return nullptr;
24}
25
27
28#include "main.moc"
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
The QStylePlugin class provides an abstract base for custom QStyle plugins.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI.
Definition qstyle.h:29
QStyle * create(const QString &key) override
Creates and returns a QStyle object for the given style key.
Definition main.cpp:18
The QWindowsVistaStyle class provides a look and feel suitable for applications on Microsoft Windows ...
Combined button and popup list for selecting options.
@ CaseInsensitive
GLuint64 key
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)
view create()