我已经安装了Qt5.1.1并创建了一个新的Gui应用程序. mainwindow.h中的代码显示:
#if QT_VERSION >= 0x050000 #include <QtWidgets/QMainWindow> #else #include <QtGui/QMainWindow> #endif@H_404_3@我觉得很好.但是当我运行它时,我有这个:
error: C1083: Cannot open include file: 'QtGui/QMainWindow': No such file or directory@H_404_3@我知道什么时候更换
#if QT_VERSION >= 0x050000 #include <QtWidgets/QMainWindow> #else #include <QtGui/QMainWindow> #endif@H_404_3@至
#include <QtWidgets/QMainWindow>@H_404_3@有用. @H_404_3@我只是想知道为什么默认代码是错误的以及如何使defauly代码正确.