QPaintDevice: Must construct a QApplication before a QPaintDevice

shredwheat pete at shinners.org
Tue Feb 27 13:54:57 EST 2007


On Feb 27, 3:35 am, "Diez B. Roggisch" <d... at nospam.web.de> wrote:
> I don't see any QPaintDevice here. Where does that come from? You need to
> give more information, a stack trace and a reduced example exhibiting the
> behaviour.

QWidget is derived from QPaintDevice, under Qt, no widgets can be
instantiated before the QApplication.

This source snippet looks like it should be working. If the exception
is happening inside Optimizer() than something really unsusual is
happening. I suspect there is python code somewhere else happening at
import time that is creating a widget. The exception traceback should
show you right where that would be.




More information about the Python-list mailing list