-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.cpp
42 lines (33 loc) · 958 Bytes
/
main.cpp
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
#include "mainwindow.h"
#include <QApplication>
#include <QFile>
#include <QStyleFactory>
#include <QSettings>
#include <gst/gst.h>
#include "preferences.h"
#include "globals.h"
int main(int argc, char *argv[])
{
gst_init( &argc, &argv );
QApplication a(argc, argv);
QApplication::setApplicationName("webrtc-ui");
QApplication::setOrganizationName("aliakseis");
QApplication::setOrganizationDomain("github.com");
QApplication::setStyle(QStyleFactory::create("Fusion"));
/* Apply stylesheet */
QFile css_data(":/style.css");
if (css_data.open(QIODevice::ReadOnly))
{
a.setStyleSheet(css_data.readAll());
css_data.close();
}
if (QSettings().value(SETTING_SESSION_ID).toString().trimmed().isEmpty())
{
Preferences prefDlg(nullptr);
if (prefDlg.exec() != QDialog::Accepted)
return 1;
}
MainWindow w;
w.show();
return QApplication::exec();
}