aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicknativestyle/qstyle/qquicknativestyle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicknativestyle/qstyle/qquicknativestyle.h')
-rw-r--r--src/quicknativestyle/qstyle/qquicknativestyle.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/quicknativestyle/qstyle/qquicknativestyle.h b/src/quicknativestyle/qstyle/qquicknativestyle.h
new file mode 100644
index 0000000000..a063f58b33
--- /dev/null
+++ b/src/quicknativestyle/qstyle/qquicknativestyle.h
@@ -0,0 +1,36 @@
+// Copyright (C) 2020 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef QQUICKNATIVESTYLE_H
+#define QQUICKNATIVESTYLE_H
+
+#include "qquickstyle.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace QQC2 {
+
+class QQuickNativeStyle
+{
+public:
+ static void setStyle(QStyle *style)
+ {
+ if (s_style)
+ delete s_style;
+ s_style = style;
+ }
+
+ inline static QStyle *style()
+ {
+ return s_style;
+ }
+
+private:
+ static QStyle *s_style;
+};
+
+} // namespace QQC2
+
+QT_END_NAMESPACE
+
+#endif // QQUICKNATIVESTYLE_H