I installed Qt5.1.1 and am creating a new Gui application. The code in mainwindow.h shows:
#if QT_VERSION >= 0x050000 #include <QtWidgets/QMainWindow> #else #include <QtGui/QMainWindow> #endif
I think everything is in order. But when I run it, I have the following:
error: C1083: Cannot open include file: 'QtGui/QMainWindow': No such file or directory
I know when I replace
#if QT_VERSION >= 0x050000 #include <QtWidgets/QMainWindow> #else #include <QtGui/QMainWindow> #endif
to
#include <QtWidgets/QMainWindow>
it works.
I'm just wondering why the default code is wrong and how to make the destructive code correct.
kalryoma
source share