Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2017-2018 Red Hat, Inc
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 <qpa/qplatformthemeplugin.h>
6
8
9using namespace Qt::StringLiterals;
10
12{
14 Q_PLUGIN_METADATA(IID QPlatformThemeFactoryInterface_iid FILE "xdgdesktopportal.json")
15
16public:
17 QPlatformTheme *create(const QString &key, const QStringList &params) override;
18};
19
21{
23 if (!key.compare("xdgdesktopportal"_L1, Qt::CaseInsensitive) ||
24 !key.compare("flatpak"_L1, Qt::CaseInsensitive) ||
25 !key.compare("snap"_L1, Qt::CaseInsensitive))
26 return new QXdgDesktopPortalTheme;
27
28 return nullptr;
29}
30
32
33#include "main.moc"
The QPlatformThemePlugin class provides an abstraction for theme plugins.
The QPlatformTheme class allows customizing the UI based on themes.
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QPlatformTheme * create(const QString &key, const QStringList &params) override
Definition main.cpp:20
Combined button and popup list for selecting options.
@ CaseInsensitive
GLuint64 key
void ** params
#define QPlatformThemeFactoryInterface_iid
#define Q_OBJECT
#define Q_PLUGIN_METADATA(x)
#define Q_UNUSED(x)
view create()