From 8e2aba0a468c189a6eb733fe3fab5b7889abb7ba Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 21 Sep 2014 19:42:26 +0200 Subject: use more savory UI style on win32 --- facetracknoir/main.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'facetracknoir/main.cpp') diff --git a/facetracknoir/main.cpp b/facetracknoir/main.cpp index 7462f8c2..aa33522d 100644 --- a/facetracknoir/main.cpp +++ b/facetracknoir/main.cpp @@ -1,11 +1,33 @@ #include "facetracknoir.h" #include +#include +#include #include int main(int argc, char** argv) { + // workaround QTBUG-38598 + QCoreApplication::addLibraryPath("."); + + // qt5 designer-made controls look like shit on 'doze -sh 20140921 +#ifdef _WIN32 + { + const QStringList preferred { "fusion", "windowsvista", "jazzbands'-marijuana", "macintosh", "windowsxp" }; + for (const auto& style_name : preferred) + { + QStyle* s = QStyleFactory::create(style_name); + if (s) + { + QApplication::setStyle(s); + break; + } + } + } +#endif + QApplication::setAttribute(Qt::AA_X11InitThreads, true); QApplication app(argc, argv); + auto w = std::make_shared(); w->show(); -- cgit v1.2.3