Results 1 to 3 of 3

Thread: QPixmap: Must construct a QApplication before a QPaintDevice

  1. #1
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    112
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default QPixmap: Must construct a QApplication before a QPaintDevice

    (deleted because I found the cause of the error - a missing DLL)
    Last edited by gib; 8th September 2019 at 06:41.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    4,118
    Thanks
    235
    Thanked 656 Times in 646 Posts
    Qt products
    Qt5
    Platforms
    Windows Android

    Default Re: QPixmap: Must construct a QApplication before a QPaintDevice

    Actually, the real reason for this is usually declaring a QPixmap instance as an automatic variable (typically as a global variable declared outside of main()) which the C++ runtime constructs prior to executing main() or the QApplication constructor. I suppose it is possible that if a DLL required to construct the QPixmap is missing, that could cause a similar complaint.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Mar 2010
    Location
    Auckland, NZ
    Posts
    112
    Thanks
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QPixmap: Must construct a QApplication before a QPaintDevice

    The missing DLL was qwt.dll. Making this available stopped the error, I don't know why. I do have a lot of global variables.

Similar Threads

  1. Replies: 16
    Last Post: 12th December 2014, 20:22
  2. Replies: 4
    Last Post: 27th December 2011, 11:34
  3. Replies: 0
    Last Post: 20th April 2009, 17:45
  4. Replies: 1
    Last Post: 8th January 2009, 13:36
  5. Must construct QApplication before QPaintDevice
    By sekatsim in forum Qt Programming
    Replies: 16
    Last Post: 8th June 2008, 00:00

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.