From 072ca960f517f0cdfcb768dcbeebba2212a6c21e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 20 Jun 2019 14:50:48 +0200 Subject: styles example: Set default style up front, and react to style changes Allows running the example with -style foo or QT_STYLE_OVERRIDE. No changes to documentation needed. Change-Id: Id7cef450f13faabd118badde51afb7273439c9fc Reviewed-by: Timur Pocheptsov --- examples/widgets/widgets/styles/main.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'examples/widgets/widgets/styles/main.cpp') diff --git a/examples/widgets/widgets/styles/main.cpp b/examples/widgets/widgets/styles/main.cpp index d340719984..471589d3ad 100644 --- a/examples/widgets/widgets/styles/main.cpp +++ b/examples/widgets/widgets/styles/main.cpp @@ -50,12 +50,15 @@ #include +#include "norwegianwoodstyle.h" #include "widgetgallery.h" int main(int argc, char *argv[]) { Q_INIT_RESOURCE(styles); + QApplication::setStyle(new NorwegianWoodStyle); + QApplication app(argc, argv); WidgetGallery gallery; gallery.show(); -- cgit v1.2.3