Update to Qt6

This commit is contained in:
woblight
2024-07-28 00:42:41 +02:00
parent 466f489303
commit 0a4d8780fe
16 changed files with 369 additions and 247 deletions
+4 -2
View File
@@ -29,7 +29,6 @@
int main(int argc, char *argv[])
{
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
QApplication app(argc, argv);
QCommandLineParser parser;
@@ -51,7 +50,10 @@ int main(int argc, char *argv[])
QQmlApplicationEngine engine;
bool ok;
QSettings setts;
QStringList styles = QQuickStyle::availableStyles();
QStringList styles = {"Fusion","Material","Imagine","Universal","Basic"};
if (!styles.contains(QQuickStyle::name()))
styles.prepend(QQuickStyle::name());
Control::m_availableStyles = styles;
QString style = setts.value("style").toString();
if (style.isNull())
style = QInputDialog::getItem(nullptr, QObject::tr("Choose a style"), QObject::tr("You will be able to pick another style later by visiting the Options tab."), styles, styles.indexOf(QQuickStyle::name()), false, &ok);