-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
50 lines (41 loc) · 1.21 KB
/
Copy pathmain.cpp
File metadata and controls
50 lines (41 loc) · 1.21 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "mainwindow.h"
#include "licensedialog.h"
#include <QApplication>
#include <QTranslator>
#include <QSettings>
#include <QProxyStyle>
class AppProxyStyle : public QProxyStyle
{
public:
int styleHint(StyleHint hint, const QStyleOption *option = 0,
const QWidget *widget = 0, QStyleHintReturn *returnData = 0) const
{
if (hint == QStyle::SH_ToolTip_WakeUpDelay)
return 500;
return QProxyStyle::styleHint(hint, option, widget, returnData);
}
};
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
#ifdef Q_OS_WIN
QCoreApplication::setOrganizationName("Patchdirector");
#endif
//QCoreApplication::setOrganizationDomain("patchdirector.com");
//QCoreApplication::setApplicationName("Patchdirector");
app.setStyle(new AppProxyStyle);
#ifdef Q_OS_WIN
app.setStyleSheet("* { font-size: 8pt; }");
#endif
MainWindow::loadTranslation();
#ifdef Q_OS_OSX
QSettings settings;
if (!settings.value("EULA").toBool()) {
LicenseDialog dlg(0, true);
if (dlg.exec() != QDialog::Accepted) return 0;
settings.setValue("EULA", true);
}
#endif
MainWindow::setMainWnd(new MainWindow());
return app.exec();
}