Debian Codegraph @

examples/widgets/painting/deform/main.cpp

raw
1 // Copyright (C) 2016 The Qt Company Ltd.
2 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
4 #include "pathdeform.h"
5
6 #include <QApplication>
7
8 int main(int argc, char **argv)
9 {
10 QApplication app(argc, argv);
11
12 bool smallScreen = QApplication::arguments().contains("-small-screen");
13
14 PathDeformWidget deformWidget(nullptr, smallScreen);
15
16 QStyle *arthurStyle = new ArthurStyle;
17 deformWidget.setStyle(arthurStyle);
18 const QList<QWidget *> widgets = deformWidget.findChildren<QWidget *>();
19 for (QWidget *w : widgets)
20 w->setStyle(arthurStyle);
21
22 if (smallScreen)
23 deformWidget.showFullScreen();
24 else
25 deformWidget.show();
26
27 #ifdef QT_KEYPAD_NAVIGATION
28 QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
29 #endif
30 return app.exec();
31 }