2022-05-10 10:06:48 +00:00
|
|
|
// Copyright (C) 2016 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
#include "pathdeform.h"
|
|
|
|
|
|
|
|
#include <QApplication>
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
Q_INIT_RESOURCE(deform);
|
|
|
|
|
|
|
|
QApplication app(argc, argv);
|
|
|
|
|
|
|
|
bool smallScreen = QApplication::arguments().contains("-small-screen");
|
|
|
|
|
2018-12-07 10:58:03 +00:00
|
|
|
PathDeformWidget deformWidget(nullptr, smallScreen);
|
2011-04-27 10:05:43 +00:00
|
|
|
|
2018-12-07 10:58:03 +00:00
|
|
|
QStyle *arthurStyle = new ArthurStyle;
|
2011-04-27 10:05:43 +00:00
|
|
|
deformWidget.setStyle(arthurStyle);
|
2018-12-07 10:58:03 +00:00
|
|
|
const QList<QWidget *> widgets = deformWidget.findChildren<QWidget *>();
|
|
|
|
for (QWidget *w : widgets)
|
2011-04-27 10:05:43 +00:00
|
|
|
w->setStyle(arthurStyle);
|
|
|
|
|
|
|
|
if (smallScreen)
|
|
|
|
deformWidget.showFullScreen();
|
|
|
|
else
|
|
|
|
deformWidget.show();
|
|
|
|
|
|
|
|
#ifdef QT_KEYPAD_NAVIGATION
|
|
|
|
QApplication::setNavigationMode(Qt::NavigationModeCursorAuto);
|
|
|
|
#endif
|
|
|
|
return app.exec();
|
|
|
|
}
|