-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathmain.cpp
43 lines (29 loc) · 866 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
43
#include "mainwindow.h"
#include <QApplication>
#include <QSplashScreen>
#include <QFile>
#include <QCommandLineParser>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
a.setApplicationName("voice-over-lan");
a.setApplicationVersion("0.1");
QPixmap m( "./Resource/logo.png");
QCommandLineParser parser;
parser.setApplicationDescription("Voice over LAN");
parser.addHelpOption();
parser.addVersionOption();
parser.addPositionalArgument("address", QApplication::translate("main", "Address of the counterpart"));
parser.process(a);
QString address("");
if(!parser.positionalArguments().isEmpty())
{
address = parser.positionalArguments().at(0);
}
MainWindow w;
QSplashScreen splash(m);
splash.show();
splash.finish(&w);
w.show();
return a.exec();
}