[PyQt] PyQt logger

Arnold Krille arnold at arnoldarts.de
Wed Mar 9 11:48:25 GMT 2011


On Wednesday 09 March 2011 12:19:37 Adrian Casey wrote:
> I plan to share as much code as possible to the point where the
> command-line interface will  actually invoke the GUI but the GUI will be
> hidden and the command-line options will simply be passed to widgets in
> the GUI.

This makes now sense. A commandline-app should be able to run without a gui, 
that means it should be able to run without any X-session. The first you are 
planning to do, the second you will not fulfill. Invoking the gui but hiding it 
will still require a graphical display. Even using QApplication will require 
graphics.

You have to use different classes where the parent class does what you want in 
an abstract way and then you create one descending class that does it the cli-
way and one that does it the gui-way. And the you invoke these classes (and 
QCoreApplication/QApplication) depending on whether you want the gui or not.

Have fun,

Arnold
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110309/804bd516/attachment.pgp>


More information about the PyQt mailing list