[PyKDE] PyQt - QApplication with the GUIenabled flag question
Phil Thompson
phil at riverbankcomputing.co.uk
Mon Dec 6 15:40:14 GMT 2004
> Hi,
>
> I am looking for some advice re a program that I am working on.
>
> I am attempting to write a small network server app to do some very simple
> data replication between two postgresql databases using Twisted and Qt.
> The
> reason that I am using Qt is that I have some classes from a companion
> application using QTimer's and QSqlQuery's that I would like to re-use.
> The
> plan was to have the program running on a network server that does not
> have
> an X server running but ...
>
> The snag: When my program starts it tries to connect to a running X
> server,
> then crashes when it can't. A short trip to google pointed me to a
> GUIenabled
> flag as one of the options for the QApplication constructor. This is
> supposed to enable console application development. Unfortunately, the
> PyQt
> docs say that the QApplication constructor with the GUIenabled flag is not
> implemented.
>
> My Questions: I have looked on the web but can't find any information to
> say
> that this is a bad idea. Therefore, given that PyQt seems to support
> pretty
> much every part of Qt, is using Qt this way a really bad thing to do? If
> not, then is this just something that has not been implemented because
> nobody
> has asked or is it really hard to implement (and won't happen any time
> soon)?
> Should I look at re-writing the classes using the standard python DB-API
> instead?
Is there any problem with using the QApplication::Tty value to the 3rd
ctor? If there is a problem I can implement the GUIenabled flag - though
it will require SIP v4.2.
Phil
More information about the PyQt
mailing list