Commit 3f74ef5f authored by Mitch Curtis's avatar Mitch Curtis
Browse files

Default to Basic controls style if not already set



In Qt 6, the Default style was renamed to Basic, and the style that is
used by default now depends on which platform the application is run
on.

Previously the Default (now Basic) style was used by default.
So, restore the Basic style as the default. This ensures consistent
results should the default ever change again.

Task-number: QTBUG-88672
Change-Id: If96dd9cccd5fd05256221991bfacb4ae7bd3a1c1
Reviewed-by: Daniel Smith's avatarDaniel Smith <Daniel.Smith@qt.io>
Reviewed-by: Volker Hilsheimer's avatarVolker Hilsheimer <volker.hilsheimer@qt.io>
parent 949ad295
......@@ -393,6 +393,10 @@ int main(int argc, char **argv)
// GL context.
setupDefaultSurfaceFormat(argc, argv);
// If it's not set, set the Qt Quick Controls style to Basic to ensure consistent results.
const QByteArray controlsStyle = qgetenv("QT_QUICK_CONTROLS_STYLE");
if (controlsStyle.isEmpty())
qputenv("QT_QUICK_CONTROLS_STYLE", "Basic");
qmlRegisterAnonymousType<QQuickView>("QmlBench", 1);
qmlRegisterType(QUrl("qrc:/Benchmark.qml"), "QmlBench", 1, 0, "Benchmark");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment