[PyKDE] qApp - myApp relationship

2002-11-18 Thread Michael Lauer
Hi, some question concerning the relationship between the qt module
global qApp attribute and the actual QApplication-derived object which I
instanciate?

Why is there a qApp object directly after importing the qt module?
Is it safe and wise to rebind the qApp with my customized QApplication
instance?

Yours,



___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde



Re: [PyKDE] qApp - myApp relationship

2002-11-18 Thread Phil Thompson
On Monday 18 November 2002 3:40 pm, Michael Lauer wrote:
 Hi, some question concerning the relationship between the qt module
 global qApp attribute and the actual QApplication-derived object which I
 instanciate?

 Why is there a qApp object directly after importing the qt module?

Because it is a wrapper for the global qApp pointer. When you create your 
QApplication, qApp gets updated to point to it. In PyQt two different Python 
objects exist - the qApp wrapper and the QApplication wrapper - but they both 
point to the same C++ QApplication instance and can be used interchangeably.

 Is it safe and wise to rebind the qApp with my customized QApplication
 instance?

It is safe but it doesn't buy you anything except the saving of one Python 
object.

Phil

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.gmd.de/mailman/listinfo/pykde