QTfrontend/main.cpp
changeset 14861 cd0af25c7913
parent 14841 b9437746bffb
child 14877 18bfa0a3c117
equal deleted inserted replaced
14860:6d95d314ae8b 14861:cd0af25c7913
   289         }
   289         }
   290 
   290 
   291         // end of parameter parsing
   291         // end of parameter parsing
   292 
   292 
   293         // Select Qt style
   293         // Select Qt style
   294         /* Qt5 Base removed Motif, Plastique. These are now in the Qt style plugins
       
   295         (Ubuntu: qt5-style-plugins, which was NOT backported by Debian/Ubuntu to stable/LTS).
       
   296         Windows appears to render best of the remaining options but still isn't quite right. */
       
   297 
       
   298         // Try setting Plastique if available
       
   299         QStyle* coreStyle;
   294         QStyle* coreStyle;
   300         coreStyle = QStyleFactory::create("Plastique");
   295         coreStyle = QStyleFactory::create("Windows");
   301         if(coreStyle != 0) {
   296         if(coreStyle != 0) {
   302             QApplication::setStyle(coreStyle);
   297             QApplication::setStyle(coreStyle);
   303             qDebug("Qt style set: Plastique");
   298             qDebug("Qt style set: Windows");
   304         } else {
   299         } else {
   305             // Use Windows as fallback.
   300             // Windows style should not be missing in Qt5 Base. If it does, something went terribly wrong!
   306             // FIXME: Under Windows style, some widgets like scrollbars don't render as nicely
   301             qWarning("No Qt style could be set! Using the default one.");
   307             coreStyle = QStyleFactory::create("Windows");
       
   308             if(coreStyle != 0) {
       
   309                 QApplication::setStyle(coreStyle);
       
   310                 qDebug("Qt style set: Windows");
       
   311             } else {
       
   312                 // Windows style should not be missing in Qt5 Base. If it does, something went terribly wrong!
       
   313                 qWarning("No Qt style could be set! Using the default one.");
       
   314             }
       
   315         }
   302         }
   316     }
   303     }
   317 
   304 
   318 #ifdef Q_OS_WIN
   305 #ifdef Q_OS_WIN
   319     // Splash screen for Windows
   306     // Splash screen for Windows