[Qt-interest] QMainWindow instantiation before QApplication

Thiago Macieira thiago at kde.org
Wed Jan 19 20:34:07 CET 2011


On Wednesday, 19 de January de 2011 15:40:11 Gustavo de Sá Carvalho Honorato 
wrote:
> Hi,
> 
> is there any issues in creating a QMainWindow instance before
> QApplcation instance?

Yes. It doesn't work at all.

>From qwidget.cpp, edited a bit:
QWidgetPrivate::QWidgetPrivate(int version)
    : QObjectPrivate(version)
[...]
{
    if (!qApp) {
        qFatal("QWidget: Must construct a QApplication before a 
QPaintDevice");
        return;
    }

-- 
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
  Senior Product Manager - Nokia, Qt Development Frameworks
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110119/394ceeac/attachment.bin 


More information about the Qt-interest-old mailing list