[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    [PyKDE] qApp is a QApplication instance
From:       "Giovanni Bajo" <rasky () develer ! com>
Date:       2005-02-16 15:47:03
Message-ID: 03e001c5143e$c2cba120$bf03030a () trilan
[Download RAW message or body]

Hello,

>>> from qt import *
>>> import sys
>>> class A(QApplication):
...     pass
...
>>> a = A(sys.argv)
>>> qApp
<__main__.qt.QApplication object at 0x007FECC0>
>>> a
<__main__.A object at 0x008035A0>


Is this expected / wanted? I had expected to be able to access the Python
instance of the application through the global qApp, not the QApplication.
In Qt, I can down-cast the qApp pointer to my subclass to access my methods,
how can I do the same in PyQt?
-- 
Giovanni Bajo

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic