summaryrefslogtreecommitdiffstats
path: root/src/fbgui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fbgui.cpp')
-rw-r--r--src/fbgui.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/fbgui.cpp b/src/fbgui.cpp
index c6f7e0d..1851ad4 100644
--- a/src/fbgui.cpp
+++ b/src/fbgui.cpp
@@ -23,10 +23,11 @@ void printUsage()
int main(int argc, char *argv[])
{
-
-
// This is the main object of a QT Application.
- QApplication a(argc, argv);
+ // The third argument sets the application as the GUI-Server,
+ // so the same as using "-qws" when calling the application.
+ QApplication a(argc, argv, QApplication::GuiServer);
+ a.setQuitOnLastWindowClosed(true);
// Note: The QT arguments (-qws, -display etc) seems to be gone at this point.
// So we should be able to ignore the QT arguments when calling fbgui,
@@ -63,13 +64,15 @@ int main(int argc, char *argv[])
// Get the application path and prints on screen.
qDebug() << "Application Path: " << a.applicationDirPath();
- QObject::connect(&a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
+;
// Create a new Framebuffer-Browser object for displaying the given URL.
fbbrowser* fbb = new fbbrowser(url);
// Listen to the signalQuitAll() Signal to kill the app from within the browser.
QObject::connect(fbb, SIGNAL(killApp()), &a, SLOT(quit()));
+ // Alternative
+
// Display the browser.
fbb->show();