[PyKDE] PyQt - QApplication with the GUIenabled flag question
phil at riverbankcomputing.co.uk
Mon Dec 6 15:40:14 GMT 2004
> 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.
> 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.
> plan was to have the program running on a network server that does not
> an X server running but ...
> The snag: When my program starts it tries to connect to a running X
> then crashes when it can't. A short trip to google pointed me to a
> flag as one of the options for the QApplication constructor. This is
> supposed to enable console application development. Unfortunately, the
> docs say that the QApplication constructor with the GUIenabled flag is not
> My Questions: I have looked on the web but can't find any information to
> that this is a bad idea. Therefore, given that PyQt seems to support
> 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
> has asked or is it really hard to implement (and won't happen any time
> Should I look at re-writing the classes using the standard python DB-API
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.
More information about the PyQt