I'm getting the following error message when building a project (KDiff3) in Qt Creator for Windows, any help would be appreciated.
C:\kdiff3\src-QT4\kreplacements\kreplacements.h:27:
error: QMainWindow: No such file or directory
#include < QMainWindow>
When updating a QT project from QT4 to QT5 if you see the above error, you will need to edit your .pro file to include:
QT += widgets
Transition from Qt 4.x to Qt5
Related
It's not answer, but yet another question! While compiling a cmake generated ninja build for Qt, we get such an error - #include "../../../../../../../e:/github/Qt/qtbase/src/corelib/animation/qparallelanimationgroup.h", or something like this. Of course, the file won't be found.
Where, I gess, is the fault - in cmake or in a cmake script for Qt building?
It happens from version into version, when you build QT a 'disk-away' far from its sources location.
As it is generated automatically, it should be found and corrected in Qt source files!
I'm working with Qt 5.12.5 and add the plugin QtCharts::QChartView in Qt Designer. But when I compile project, the error below appear:
:-1: error: No rule to make target 'QtCharts/QChartView>', needed by 'ui_display.h'. Stop.
It seems like qt cannot compile module QtCharts/QChartView. Any suggestion?
I already
installed Qt Charts and Qt Data Visualization by using Qt Maintainer
add QT += charts in .pro file
I'm new to Qt, learning through a Qt Creator tutorial. I am trying to connect Qt with a MySQL database. To do so, I have to modify a .pro file adding the command QT += core sql
However, once I create a project there is no .pro file in the menu, only the .ccp file.
Program installed: Qt Creator 4.13.0
OS: Windows 10 x64
Steps followed:
Choose New Project
Choose Qt Console Application
Build system: CMake
Kits: I have some available; I am using Qt 5.15.1 MSVC2019 64bit
The menu displayed shows a CMakesList.txt file, and the main.ccp source file. However no .pro file is created.
For new build system you should modify CMakeList.txt file.
Please try to replace
target_link_libraries(myapp Qt5::Gui)
with
target_link_libraries(myapp Qt5::Gui Qt5::Sql)
I installed qt creator and qt 3dstudio with the qtOnline installer for linux. I want to build a project using these two packages. I design my project in qt3dstudio and then I use qtcreator to code the logic of the program. But I cannot import qt3dstudio module into the code.any suggestions??
I need to get this going on ubuntu 16.04LTS. I couldn't find anything useful on the web about the problem. I did try to build qt3dstudio but some of the dependencies caused my ubuntu desktop to stop working and I had to reinstall ubuntu.
QT modules in my .pro file:
QT += widgets qml quick gui 3dstudioruntime2
and when I hit build I get the following error:
Unknown module(s) in QT: 3dstudioruntime2
I get an QT project that uses cmake not qmake. CMakeList.txt file includes some QT modules.
find_package (Qt5 REQUIRED COMPONENTS Widgets Core Gui Multimedia SerialPort Declarative)
I run QT5.7 using sudo ./qt-unified-xxxx.run command. It tried to install /opt/ folder, I didn't change this path.
If I write Qml Quick module instead of Declarative, I get c++11 error.
/QtCore/qbasicatomic.h:61:4: error: #error "Qt requires C++11 support"
# error "Qt requires C++11 support"
After installation, I arrange project setting to use cmake. But qt run button is not active due to below message.
Project ERROR: Unknown module(s) in QT: declarative
I check QT5 submodules, QT5.7 does not include Declarative module.When
I could not find how to install Declarative module or handle this problem.
Ok, I see that Declarative was removed only starting from Qt 5.6 (https://wiki.qt.io/New_Features_in_Qt_5.6). Replace it with QtQuick and fix all QML/C++ code if there are errors (http://doc.qt.io/qt-5/qtquick-porting-qt5.html).