[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: GUI-less DCOP client?
From: Waldo Bastian <bastian () kde ! org>
Date: 2004-07-31 13:25:16
Message-ID: 200407311525.16438.bastian () kde ! org
[Download RAW message or body]
On Saturday 31 July 2004 03:07, James Horey wrote:
> Hi,
>
> Is there any way to create a DCOP client that doesn't have a GUI?
Yes, just use a QApplication or KApplication object without a GUI.
See for example:
/**
* This constructor takes aboutData and command line
* arguments from KCmdLineArgs.
*
* @param allowStyles Set to false to disable the loading on plugin based
* styles. This is only useful to applications that do not display a GUI
* normally. If you do create an application with @p allowStyles set to
false
* it normally runs in the background but under special circumstances
* displays widgets. Call enableStyles() before displaying any widgets.
*
* @param GUIenabled Set to false to disable all GUI stuff. This implies
* no styles either.
*/
KApplication( bool allowStyles=true, bool GUIenabled=true);
So KApplication myApp(false, false) will create a KApplication that doesn't
use a GUI and that will not try to connect to an X-server.
Note that by default, DCOPClient will try to connect to the dcopserver that is
associated with the users X server, based on the contents of the $DISPLAY
environment variable. If you run without X server you either will need to set
$DISPLAY to something or specify the address of the dcopserver explicitly via
DCOPClient::setServerAddress()
Cheers,
Waldo
--
bastian@kde.org | KDE Community World Summit 2004 | bastian@suse.com
bastian@kde.org | 21-29 August, Ludwigsburg, Germany | bastian@suse.com
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic