aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-01-11 10:18:08 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-01-11 10:18:08 +0100
commit120a5f7c6d31a3bc5acdb54b19326516f8399767 (patch)
tree882e3a096a2ef9bd3138633fb564024e45ba6524 /src/main.cpp
downloadsmolbote-120a5f7c6d31a3bc5acdb54b19326516f8399767.tar.xz
Initial commit0.1.0
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
new file mode 100644
index 0000000..94ad981
--- /dev/null
+++ b/src/main.cpp
@@ -0,0 +1,26 @@
+#include "browser.h"
+#include "mainwindow.h"
+#include <QApplication>
+#include <QCommandLineParser>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ app.setApplicationName("qtwebenginebrowser");
+ app.setApplicationVersion("0.0.0");
+
+ QCommandLineParser parser;
+ parser.setApplicationDescription("Test browser using QtWebEngine");
+ parser.addHelpOption();
+ parser.addVersionOption();
+
+ QCommandLineOption configOption(QStringList() << "c" << "config", "Set configuration file.", "PATH", "config.ini");
+ parser.addOption(configOption);
+
+ parser.process(app);
+
+ Browser instance(parser.value(configOption));
+ instance.addWindow(new MainWindow(instance.settings()));
+
+ return app.exec();
+}