[Qt-interest] Switching QApplication without GUI to use GUI

Andreas Pakulat apaku at gmx.de
Wed Mar 25 20:44:31 CET 2009


On 25.03.09 14:46:18, Daniel Grubbs wrote:
> Hi Folks,
> 
> I've got an application which I would like to run as a background daemon if
> there is no GUI present, but with a GUI if one is present.  Also, it may
> start up before the GUI starts and then add some interface once the GUI
> starts.  Could I start the qApp as QApplication( argc, argv, false) and
> later change to GUIenabled = true somehow after X window system starts?

No. The only way I can think of is splitting gui and non-gui part into two
applications which then communicate via some IPC mechanism with each other
(sockets or stdin/stdout) and the daemon starting the gui-client once it
knows on which display the X11 server runs.

Andreas

-- 
Your aim is high and to the right.



More information about the Qt-interest-old mailing list