I'm trying to compile some qml on a Raspberry pi 3 running Raspbian-Jessie using qt5 (5.3.2).
I managed to run some simple stuff but now I need to use QtQuick.Controls so I added
import QtQuick.Controls 1.0 to my qml file but when I try to run it, I get this error message: module "QtQuick.Controls" is not installed
Qt is installed in the following folder /usr/lib/arm-linux-gnueabihf/qt5/ (it's auto detected) so I went there and found that QtQuick Controls is actually in there (in [path to qt]/qml/QtQuick/Controls)
Do I need to do something to actually install it ?
I tried to add /usr/lib/arm-linux-gnueabihf/qt5/qml/QtQuick/Controls to QML_IMPORT_PATH but I still get the error message.
I also read that I need QtQuick 2.0 for QtQuick.Controls to work but when I change import QtQuick 1.0 to import QtQuick 2.0 I get a module "QtQuick" version 2.0 is not installed
Anyone managed to use QtQuick.Controls on Raspberry Pi ?
Any advice on how to debug this ?
Dependencies for QML in Raspbian are somewhat confusing. Try checking if you have these packages installed, using apt-get install, or apt-cache search first to see what every single package does:
qtdeclarative5-*
qml-module-qtquick*
qtquick1-*
qtquickcontrols5-*
qml-module-qtquick2
After that, Qt Creator should compile without problems.
Related
My Qt application is failing to start with the following error:
module "QtQuick.Controls" version 2.12 is not installed
My platform is Ubuntu 20.04.2 LTS. This is a well-known error on StackOverflow. Unfortunately, no answers have worked for me this far. I have exhausted all suggested remedies without any improvement. These are enumerated below:
Checking compatibility of Qt with QuickControls: I am using Qt 5.12.8 in QtCreator, and QtCreator 4.11.0. I installed Qt using sudo apt install qt5 default and sudo apt-get install qtcreator. According to the documentation (see here, Qt 5.12 is directly compatible with QtQuick 2.12:
Checking if I specified QtQuick as a dependency: In my .pro file, I have added QT += quick qml quickcontrols2
Checking if I have the right libraries: I have qtquickcontrols2-5-dev, qt5declarative5-dev, and qml-module-qtquick-controls. Furthermore, apt-cache search qtquick shows me that all the qtquick modules are there
Re-installing qtcreator: Some questions suggest re-installing QtCreator. I have tried this, but it had no effect
QML Emulation layer: I have configured my project to "Use QML emulation layer that is built with the selected Qt". However, this also had no effect
Having performed every one of these steps, and exhausted all StackOverflow questions and Github threads related to the topic, I still cannot find what is causing this issue.
I have additionally included some related questions that I've tried. Question 4 is perhaps the closest to mine, but was solved via the Yocto build system that I am not using:
import QtQuick.Controls 2.1 QML MODULE NOT FOUND
Error module "QtQuick" version 2.12 is not installed
Ubuntu QT install qt quick controls 2.1
Qt - Module "QtQuick.Controls" is not installed
I would be extremely appreciative of any advice on further resolving this matter.
You are missing the qml module for controls 2 because you have installed qml-module-qtquick-controls instead of qml-module-qtquick-controls2.
The QML engine will look for a module inside the path from QML2_IMPORT_PATH, by following the namespaces, so in this case QML2_IMPORT_PATH/QtQuick/Controls and QML2_IMPORT_PATH/QtQuick/Controls.2 (see version semantics documentation ). If in these folders it finds a qmldir file, it will parse it and look for any component that has at least 2 as major and something lower or equal to 12 as minor (allthough this particular qmldir doesn't state any components... it probably also reads the libqtquickcontrols2plugin.so or plugin.qmltypes)
I created an application with Qt5.9.3 on iOS 12 and in a qml file, I use a SwipeView so I need:
import QtQuick 2.7 // also test 2.9
import QtQuick.Controls 2.0 // also test 2.1, 2.2
But I keep having the error:
module "QtQuick.Controls" version 2.0 is not installed
In my cmake file, I added the specific modules Quick and QuickControls2, the lib are installed with Qt5.9.3, so I have:
set( MY_QT_MODULES Core Gui Qml Quick QuickControls2 all/modules/I/need)
find_package( Qt5 PATHS my/path/to/Qt COMPONENTS $(MY_QT_MODULES) )
What is missing in that? Thanks.
I had to add
Q_IMPORT_PLUGIN(QtQuickControls2Plugin)
in the main.cpp.
I've been getting the error "module "QtQuick.Controls" version 2.0 is not installed" on Qt Creator 5.6.13, so i upgraded to 5.11.2 and i'm still getting it.
Here's the part causing it:
import QtQuick.Controls 2.0
Thank you for your help.
use this command to install it on linux
sudo apt install qml-module-qtquick-controls2
Make sure you activated your Qt kit in Projects > Build & Run as follow:
Ok so, I was building with the Qt Creator 5.6.3 compiler.
Projects => Build & Run => change to the corresponding kit.
I have recently started some development with qpython3 for android and would like to utilize numpy in the code implementation. I have tried to install numpy through the following code process
intall pip
pip.main(['install','numpy])
however, when the code runs the command, I get an error informing me that I must have python 2.7 or python 3.4 installed. It looks as if it tries to install a version of numpy that was meant for an actual python3 installation and not qpython. I also tried navigating to http://qpypi.qpython.org to download the zip file directly, but when I clicked on the link for numpy-qpython, nothing happens.
I have an existing PyQt5/Python3.4 application that works great, and would now like to add "real-time" data graphing to it. Since matplotlib installation specifically looks for Python 3.2, and NumPhy / ipython each have there own Python version requirements, I thought I'd use a python distribution to avoid confusion.
But out of all the distros (pythonxy, winpython, canopy epd) Anaconda is the only one that supports Python 3.4, however it only has PyQt 4.10.4. Is there a way I can install Anaconda, and use matplotlib from within my existing PyQt5 gui app?
Would I be better off just using another charting package (pyqtgraph, pyqwt, guiqwt, chaco, etc) that might work out of the box with PyQt5/Python3.4?
I was able to install it from dsdale24's and asmeurer's channels but then, when trying to run a qt script with a QApplication object, I got an error message regarding to cocoa library not being found.
Then, following asmeurer's comment, I could install PyQt5 on anaconda with python 3.4 using the mmcauliffe package:
conda install -c https://conda.anaconda.org/mmcauliffe pyqt5
Now it works great!
We are working on adding pyqt5, but for now, you can install it from https://binstar.org/dsdale24/pyqt5.
conda config --add channels dsdale24
conda install pyqt5
create an env like this:
conda create –name my_env python=3.5 pyqt=5
works great.
I use Anaconda and with Python v2.7.X and qt5 doesn't work. The work-around I found was
Tools -> Preferences -> Python console -> External modules -> Library: PySlide