examples/widgets/wiggly/main.cpp
changeset 33 3e2da88830cd
parent 30 5dc02b23752f
equal deleted inserted replaced
30:5dc02b23752f 33:3e2da88830cd
    43 #include "dialog.h"
    43 #include "dialog.h"
    44 
    44 
    45 int main(int argc, char *argv[])
    45 int main(int argc, char *argv[])
    46 {
    46 {
    47     QApplication app(argc, argv);
    47     QApplication app(argc, argv);
    48     bool smallScreen = false;
    48     bool smallScreen = QApplication::arguments().contains("-small-screen");
    49     for (int i=0; i<argc; i++)
    49 
    50         if (QString(argv[i]) == "-small-screen")
    50     Dialog dialog(0, smallScreen);
    51             smallScreen = true;
    51 
    52     Dialog dialog(0,smallScreen);
    52     if (!smallScreen)
    53     if (!smallScreen){
       
    54         dialog.show();
    53         dialog.show();
    55     }
    54     else
    56     else{
       
    57         dialog.showFullScreen();
    55         dialog.showFullScreen();
    58     }
       
    59     return app.exec();
    56     return app.exec();
    60 }
    57 }