summaryrefslogtreecommitdiffstats
path: root/examples/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets')
-rw-r--r--examples/widgets/wiggly/main.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/examples/widgets/wiggly/main.cpp b/examples/widgets/wiggly/main.cpp
index 4a6cd5d..8ad7696 100644
--- a/examples/widgets/wiggly/main.cpp
+++ b/examples/widgets/wiggly/main.cpp
@@ -46,16 +46,13 @@
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- bool smallScreen = false;
- for (int i=0; i<argc; i++)
- if (QString(argv[i]) == "-small-screen")
- smallScreen = true;
- Dialog dialog(0,smallScreen);
- if (!smallScreen){
+ bool smallScreen = QApplication::arguments().contains("-small-screen");
+
+ Dialog dialog(0, smallScreen);
+
+ if (!smallScreen)
dialog.show();
- }
- else{
+ else
dialog.showFullScreen();
- }
return app.exec();
}