Hi all,

I am getting this error on my application, even before main() is executed:
Qt Code:
  1. QWidget: Must construct a QApplication before a QPaintDevice
To copy to clipboard, switch view to plain text mode 

The funny (?) thing is that I only get it when choosing "debug and build" in QDevelop's menus. When compiling for release it works flawlessly. Any ideas?

Here is my main, not even the first line (line number 9 in this code) is printed:
Qt Code:
  1. #include <cstdlib>
  2. #include "mainwindowimpl.h"
  3. #include <QApplication>
  4.  
  5. using namespace std;
  6.  
  7. int main(int argc, char ** argv)
  8. {
  9. printf("111111111111");
  10. QApplication app( argc, argv );
  11. MainWindowImpl win;
  12. win.show();
  13. app.connect( &app, SIGNAL( lastWindowClosed() ), &app, SLOT( quit() ) );
  14. return app.exec();
  15. }
To copy to clipboard, switch view to plain text mode 

Here is the generated faulty pro file
Qt Code:
  1. TEMPLATE = app
  2. QT = gui core
  3. CONFIG += qt warn_on console debug_and_release
  4. OBJECTS_DIR = build
  5. MOC_DIR = build
  6. UI_DIR = build
  7. FORMS = ui/mainwindow.ui
  8. HEADERS = src/mainwindowimpl.h
  9. SOURCES = src/mainwindowimpl.cpp src/main.cpp
  10. INCLUDEPATH = d:\source\qwt-5.0.2\src
  11. LIBS = d:\source\qwt-5.0.2\lib\libqwt5.a
To copy to clipboard, switch view to plain text mode 

Here is the working pro file:
Qt Code:
  1. TEMPLATE = app
  2. QT = gui core
  3. CONFIG += qt warn_on console release
  4. OBJECTS_DIR = build
  5. MOC_DIR = build
  6. UI_DIR = build
  7. FORMS = ui/mainwindow.ui
  8. HEADERS = src/mainwindowimpl.h
  9. SOURCES = src/mainwindowimpl.cpp src/main.cpp
  10. INCLUDEPATH = d:\source\qwt-5.0.2\src
  11. LIBS = d:\source\qwt-5.0.2\lib\libqwt5.a
To copy to clipboard, switch view to plain text mode 

System is MingW, Xp, Qt 4.3.2, QDevelop 0.25.