I know that there're many questions regarding this aspect:
QML module not found (QtCharts)
How to include the QtCharts library in Qt Creator 4.2.0 (Community)
How to fix "QtCharts" library file not found/can't include <QtCharts>?
Importing QtCharts in QML causes module not installed error
Many more...
But most of them solve this issue by adding QtChart in Qt Maintenance tool, and I've already done this (and re-checked it).
But when using it:
QT += charts
I still received the Unknown module(s) in Qt error.
I've already asked this question in forum.qt.io, (and as I was asking, this question received no satisfactory answer, so please don't judge me if an answer is found on the forum by the time you answer this question), and some people said that I need to install and build the module first.
If this is the case, how do I do it? If not, what should I do with this? I'm thinking of reinstalling Qt and adding the module immediately when installation occured.
Link to question : https://forum.qt.io/topic/127564/qtcharts-module-not-found-even-after-installing-in-qt-maintenance
Some system info:
Windows 10, 64 bit
QtCreator 4.15.1
Qt 5.12.2 (MSVC 2019, 64 bit)
It seems you have only installed Qtcharts in the Additional libraries section.I know it's showing 0mb installation which is useless.
Select the QT section which is below the additional libraries section. Then select the version you have installed. Under the selected version there is a QT charts module, select it and install that.
Then go to your project and run a 'qmake'. Now you can observe all the errors are gone.
I had the same problem and I uninstalled and reinstalled Qt with QTChart. But the problem was not solved.
Accidentally, after installing Qt5, I used the following command to uninstall Qt4 libraries, and the problem was solved!
sudo apt purge qt4*
Related
I installing Qt open source framework in my window 10 pc. I already downloaded Mingw compiler and installed it to write C/C++. Now I wanna learn QT framework. I using Qt online installer. I choice to download custom compoment. Do I need to selet mingw component to download if i had already installed?
Note that there's not just one MinGW distribution and version out there. You can check out the exact supported version per Qt release at https://wiki.qt.io/MinGW .
Anyhow, if you install the pre-built Qt binaries via the online installer, the matching MinGW version will automatically be installed for you, and will be registered in Qt Creator so that things just work. There is actually no official way to prevent this.
I'm trying to compile this code where the .pro file includes a
QT += serialport
gives me a
Project MESSAGE: Warning: unknown QT: serialport
error. Without Qt, I would use CMake and install the package via vcpkg, Conan, HomeBrew, or something like that. But not sure if Qt has its own package manager. I would appreciate it if you could help me know what is the most canonical way to install and include this library.
P.S.1. In the comments, I'm being told that I need to use Qt's Maintenance Tool, which is sorta the internal package manager for Qt, to install QtSerialPort module. Given that I don't know how to install that via HomeBrew, I installed Qt Creator from the Qt website. I found the Maintenance Tool in <install_dir> the installation folder /Users/<user>/Qt/MaintenanceTool.app which I could open from the terminal by open MaintenanceTool.app while being in that folder. However, I can not see any QtSerialPort module in the options, nor a way to search.
P.S.2. Posted a new question here.
P.S.3. I think this issue arises because I had multiple versions of Qt installed. once I searched for locate qmake and found out the other versions I have installed (e.g., /System/Volumes/Data/usr/local/Cellar/qt/5.14.1/bin/qmake) I could just run that and the MakeFile was generated.
I want to include Anaconda's Python 3.6 in my Qt C++ application. The reason why is that I want to be able to include a neural network in my C++ application, which is written in Python.
I tried to include Python in the following way, which I found online:
INCLUDEPATH += /home/[username]/anaconda3/include/python3.6m
LIBS += -L/home/[username]/anaconda3/lib/ -lpython3.6m
It finds the Python.h header but linking to the Python libraries causes Qt Creator to (apparently) use the Qt libraries of Anaconda and not the ones I downloaded and installed in my home folder.
This is problematic for two reasons:
My program needs Qt 5.9.1 and does not compile with Qt 5.6 (Anaconda's version)
Even if it compiled with Qt 5.6 there are suddenly errors of missing libraries, see below:
Is there any way to include Python from Anaconda but tell Qt Creator to use my custom Qt Version?
Unknowingly, I had the same problem again with a different application and thus posted a new question because I thought it was a different issue.
I found a solution in the mean time and posted the answer here.
Just recently I have begun to review the code for a project produced by a friend roughly 4 years ago. However, to compile this project I need an outdated version of Qt (version 3.3.8). Much of the code used in this project isn't supported in the same style as Qt4. So I'd first like to obtain Qt3 before I transition to Qt4.
Ubuntu has decided to no longer carry "qt3-dev-tools". Ubuntu has limited the selection to "qt4-dev-tools" in its repository. So installing via the command line option (sudo apt-get install qt3-dev-tools) results in an error:
"Unable to locate package qt3-dev-tools."
So, from here I did some digging for a manual installation? I found a great website to help me through the process, but I'm not very knowledgeable about Ubuntu, or Linux in general. Step 1 was simple. But step 2 and onward stumped me. I'm supposed to be both adding the environment variables listed in step two to the .profile file and then setting them, correct?
In step 2, is logging in again just meant for users with the .login shell? When I type in $HOME/.qt-license of step three, I suppose I'm typing this into the terminal?. Same with the ./configure? Both of these commands return no such file exists.
Does anyone know a better walk through to install Qt3 files, or can give a quick breakdown of this tutorial?
The website tutorial:
http://krm.am.gdynia.pl/doc/qt-3.3.8/INSTALL
If u can get .rpm package then open it in ubuntu software centre . It will get installed.
http://download.qt.io/archive/qt/3/ try downloading the package for qt3 from this qt archive & install it.
I downloaded the offline Qt 5.1.1 (32-bit) package from the website. Just installed it on my Ubuntu 12.04 machine. I had installed build-essentials prior to the Qt install.
I opened a new Application/GUI project in Qt Creator to play around with. Haven't added anything to it yet so it just has its default files. I tried to build it using the Creator Build button and it throws errors:
:-1: error: skipping incompatible /home/Me/Qt5.1.1/5.1.1/gcc/lib/libQt5Widgets.so when searching for -lQt5Widgets
:-1: error: cannot find -lQt5Widgets <
Does same thing for the QtCore/Gui files.
Decided to open one of the examples that was included with Qt. Then built it. It also threw the same errors.
What's wrong? My extra reading said something about adding a QT += widgets line in the .pos file but that seems to be there, automatically, inside a version checker.
I thought this was going to be working out of the box? What have I missed?
Turns out Frank was right. While I was correct that I downloaded the 32-bit version of QT I was incorrect about what I was running on the Lenovo for an OS. I'm actually running the 64-bit Linux. Didn't think this old thing had the 64-bit loaded on it. Doh!
Downloaded the 64-bit QT and problem solved.
Thanks Frank for the heads up.