[Qt-interest] QWidget: Must construct a QApplication before a QPaintDevice
Andreas Pakulat
apaku at gmx.de
Mon Aug 31 20:03:14 CEST 2009
On 31.08.09 17:22:36, Andre Somers wrote:
> Hi,
>
> I am experiencing a weird problem. When I compile my program with the
> release flag, I get the above error if I run it through the debugger. If
> I run it directly, it aborts with a code 3. However, when I compile a
> debug version of my program, the problem does not occur.
>
> The problem is weird anyway, because in my main function, the first
> thing I do is construct a QApplication. Here is my main function:
main() is not necessarily the "first" thing, static objects are created
before main, so you should check your code for any widgets created as
static objects. Or other "global" variables you create on the stack in
some .cpp file.
Andreas
--
Good day for overcoming obstacles. Try a steeplechase.
More information about the Qt-interest-old
mailing list