blob: 9c2ced45e36fcb5fab27fd1dd84cb537a0874f03 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include "ui.h"
#include <QApplication>
#include <QStyleFactory>
#include <QStringList>
#include <memory>
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<MainWindow>();
w->show();
app.exec();
return 0;
}
|