Hi, I am confused by this problem. When I run my application, a Runtime Error occurs. The following is my main.cpp
Qt Code:
  1. #include "userDB.h"
  2. #include "manager.h"
  3. #include "user.h"
  4. #include <QApplication>
  5. #include <QTextCodec>
  6. #include <QPixmap>
  7.  
  8. UserDB users; //所有已经注册的用户
  9. User currentUser; //当前用户
  10. QPixmap noDishImage; //comment this line, it works fine
  11.  
  12. int main(int argc, char *argv[])
  13. {
  14. QApplication a(argc, argv);
  15. QTextCodec::setCodecForTr(QTextCodec::codecForName("GB2312"));
  16. Manager w;
  17. w.show();
  18. return a.exec();
  19. }
To copy to clipboard, switch view to plain text mode 
User and UserDB are two classes I write.
Why declaring global variables of my own classes the application works fine, while declaring a blobal variable of the QPixmap leads the application to crash??
Any ideas appreciated!!