QPaintDevice: Must construct a QApplication before a QPaintDevice

boris.smirnov at gmail.com boris.smirnov at gmail.com
Tue Feb 27 15:56:47 EST 2007


shredwheat napísal(a):
> 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.

Thanks for the reply.
I'm not so familiar with python so could you explain me how to use and
become the exception traceback. I've tried today to read something for
the beginners about traceback and stack trace in the forum, but I
haven't found something really understadable for met.
Some piece of code for my case will help :) and I want to learn it of
course.

Thanks.
Boris




More information about the Python-list mailing list