[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Deamons with Qt?
From: Simon Hausmann <sh () caldera ! de>
Date: 2001-02-25 12:41:01
[Download RAW message or body]
On Sun, Feb 25, 2001 at 07:23:22AM -0500, Mirko Boehm wrote:
> Richard Moore wrote:
>
> >
> > Mirko Boehm wrote:
> >
> >> Hi guys,
> >>
> >> does anyone know if there are any reference projects using Qt inside of
> >> deamon programs? I would like to communicate with QSockets and
> >> QDataStreams between a regular KDE program and a process running on a
> >> server without GUI.
> >>
> >> Any ideas?
> >
> >
> > Look at kded etc. IIRC basically you use the GUIenabled argument
> > to QApplication and avoid anything that relies on an event loop
> > existing eg. I'd say QSocket probably won't work as there is
> > no event loop to trigger the QSocketNotifiers, but you should
> > be ok with using QDataStreams and your own select() call.
>
> That is exactly the problem I had, I have already checked out kded and
> dcopserver.
> You either need to have a X Server running to have an event loop, or you
> may have a QApplication, but only that parts of Qt work that do not rely
> on the event loop.
> This limits Qt's fitness for deamons, since it would be a great deal to
> be able to use the sam eIO device classes (for example) your client
> programs use.
Huh? It's no problem to construct a QApplication object with the GUIEnabled
being false. QApplication will then just not attempt to connect to the
X server, but it will still do a select() for any QSocketNotifiers you use.
Bye,
Simon
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic