This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Scenario: - Install Qt 5.0 on Ubuntu - Add qmake to PATH and toolchain - Create "C/C++ Qt Application" or "Hello Qt World" project - Build project ==> make[2]: Вход в каталог `/home/sova/NetBeansProjects/QtApplication_1' g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.0/5.0.0/gcc_64/mkspecs/linux-g++-64 -Inbproject -I/opt/Qt5.0.0/5.0.0/gcc_64/include -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtGui -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtCore -I. -I. -o build/Debug/GNU-Linux-x86/main.o main.cpp main.cpp:8:30: фатальная ошибка: QtGui/QApplication: Нет такого файла или каталога компиляция прервана. - Add "QT += widgets" into "Build|Qt|Custom Definitions" field - Rebuild project ==> make[2]: Вход в каталог `/home/sova/NetBeansProjects/QtApplication_1' g++ -c -m64 -pipe -g -Wall -W -D_REENTRANT -fPIE -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I/opt/Qt5.0.0/5.0.0/gcc_64/mkspecs/linux-g++-64 -Inbproject -I/opt/Qt5.0.0/5.0.0/gcc_64/include -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtWidgets -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtGui -I/opt/Qt5.0.0/5.0.0/gcc_64/include/QtCore -I. -I. -o build/Debug/GNU-Linux-x86/main.o main.cpp main.cpp:8:30: фатальная ошибка: QtGui/QApplication: Нет такого файла или каталога компиляция прервана. - Replace "#include <QtGui/QApplication>" on "#include <QApplication>" in main.cpp - Rebuild project ==> ok
Here is the fix: http://hg.netbeans.org/cnd-main/rev/35af16f3c8b3 The described changes works for Qt 4 as well, so I've turned them on by default.
Integrated into 'main-golden', will be available in build *201305282301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/35af16f3c8b3 User: igor_nikiforov <igor_nikiforov@netbeans.org> Log: Bug 225495 - Qt5: build fails on #include <QtGui/QApplication> - fix.