Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.3.0-beta1
-
Qt Creator master branch 2adc5c5dc63835644912e403690c230739c27316
Gentoo Linux amd64
Windows 7 64 bit
-
d5b4dd65d38796b6c0287ba9c043c41b0435ac81
Description
"File" > "New File or Project..." > "Application" > "Qt Widgets Application" generates a header file below when the option" C++" > "Qt Class Generation" > "Add Qt Version #ifdef for module names" is unchecked.
mainwindow.h
#ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QtGui/QMainWindow> namespace Ui { class MainWindow; } class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); ~MainWindow(); private: Ui::MainWindow *ui; }; #endif // MAINWINDOW_H
This doesn't compile because QMainWindow belongs QtWidgets module in Qt 5.
Qt Creator is shipped with Qt 5 now a days, can we change it #include <QtWidgets/QMainWindow> by default?
or can we simply remove QtGui/ from there?
Attachments
Issue Links
- relates to
-
QTCREATORBUG-13280 Template "Qt Widgets Application" doesn't compile with Qt5 and Use Qt module name.
- Closed