Results 1 to 7 of 7

Thread: Qwt and Qwtpolar : "Qwidget: Must construct a QApplication before a QWidget"

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2014
    Posts
    4
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qwt and Qwtpolar : "Qwidget: Must construct a QApplication before a QWidget"

    Hi Uwe,

    Thanks a lot for your reply. Following it, I checked with DepedencyWalker the dependencies of qwtpolard.dll and saw that
    it depended on qwt.dll (instead of qwtd.dll). The reason is the following : Previously, in order to compile the qwtpolar libraries
    under QtCreator I had to add qwt paths (lib and include) and library name to the qwtpolar/src/src.pro file and forgot to make
    the distinction between release and debug mode.

    When I do it in the right way (using CONFIG(debug, debug|release) ... ) it works perfectly : qwtpolard.dll depends on qwtd.dll
    and my application runs in both modes.

    The question is now : why do I have to add the dependencies to qwt (lib and include paths) when I try to compile qwtpolar
    whereas I use the default .pro files delivered with qwtpolar1.1.1 ?

    Thanks again.

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,325
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qwt and Qwtpolar : "Qwidget: Must construct a QApplication before a QWidget"

    You didn't install qwtpolar properly - instead you are trying to build against something left over in the build directory. Once having qwtpolar installed, you will see, that qwtpolar.prf ( CONFIG += qwtpolar ) is the one for building applications.
    Have a look at http://qwt.sourceforge.net/qwtinstall.html. The concepts are the same for qwtpolar then.

    Putting the sources of qwt and qwtpolar and your application into one project is not the officially supported way and then you have to be able to ship around those issues yourself.

    Uwe

Similar Threads

  1. Replies: 16
    Last Post: 12th December 2014, 20:22
  2. QWidget: Must construct a QApplication before a QWidget
    By Connailo in forum Qt Programming
    Replies: 1
    Last Post: 27th October 2014, 08:02
  3. Replies: 2
    Last Post: 25th July 2011, 08:08
  4. Replies: 0
    Last Post: 20th April 2009, 17:45
  5. Replies: 1
    Last Post: 8th January 2009, 13:36

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.