[Qt-interest] QWidget: Must construct a QApplication before a QPaintDevice
wim.delvaux at adaptiveplanet.com
wim.delvaux at adaptiveplanet.com
Sat Dec 12 14:47:38 CET 2009
On Saturday 12 December 2009 13:19:55 Santhosh Y wrote:
> Hi,
>
> I am facing a problem saying "QWidget: Must construct a QApplication
> before a QPaintDevice",
> when I am invoking a GUI-application (which is in .dll form) in my
> application.
>
> ======================================
> Scenario is as follows:
> ======================================
> - I developed a GUI application using Qt (my first application)
> - In the development of second application, I integrated my first
> application as a DLL in to the second application
> - I launched the second application as we usually do. (QApplication
> creation ...). I am able to show all GUI widgets
> specific to my second application.
> - When I am trying to invoke my first application, from second
> application, it is showing the message
> "QWidget: Must construct a QApplication before a QPaintDevice" and
> exiting from that point.
>
>
> Can anyone suggest me what is wrong here?
the qApp object needs to be created (test it before you create your widget for
NULL and create if necessary -> lazy loading of qApp)
More information about the Qt-interest-old
mailing list