In QT how to check the running system contains library import QtQuick.Controls 1.4
Related
I'm running Qt 5.12 on ubuntu 20.04.3. Qt software components are installed with apt. My C++ application uses Qt DataVisualization . I've installed these apt packages for DataVisualization:
libqt5datavisualization5-dev
qml-module-qtdatavisualization
The app compiles OK, but the runtime cannot find the qml module. My qml file contains this import statement as specified by Qt documentation:
import QtDataVisualization 1.15
But at runtime I get the error:
QQmlApplicationEngine failed to load component
qrc:/main.qml:6 module "QtDataVisualization" version 1.15 is not installed
I get a similar runtime error if qml has "import QtDataVisualization 1.14".
Can someone help please? Thanks!
This page indicates that DataVisualization 1.2 should be imported for Qt 5.12 applications - this resolves my issue.
I am trying to build any random QML component, and having this line import QtGraphicalEffects 1.15 will cause an error: 'module "QtGraphicalEffects" is not installed`
I am running on a virtual machine and just created a new virtual environment with Pyside6 and Python using pip install PySide6==6.1.2 to get the latest version. I can find the folder GraphicalEffects with a qtgraphicaleffectsplugin.dll in the Qt5Compat folder of the PySide6 Lib so I do not know why it cannot import this module. The other ones like QtQuick.Controls import fine.
I have also used print("Qt version: " + str(QtCore.qVersion())) to double check Qt version, and I get Qt version: 6.1.2
There seems to be some solutions in other discussion posts, but I have not found one that refers to Python side of things. I am aware Qt 6.0 does not seem to have QtGraphicalEffects, but it's supposed to be in 6.1. I am also not sure if this has to do with the virtual machine because on host I actually have no issue using QtGraphicalEffects
Qt QtGraphicalEffects is available in PySide6 but the module has changed the way of importing to import Qt5Compat.GraphicalEffects as indicated in the docs.
I'm new to Qt/QML/Qt Quick.
I have Qt 5.14 and QtCreator installed and am attempting to build a sample application.
Currently I have QtQuick 2.12 installed (which came with the QtCreator installation).
How/where do I get the latest version of the QtQuick2 libraries and make them
accessible to QtCreator?
What is the latest version of QtQuick2?
Change import QtQuick 2.12 to import QtQuick 2.14.
TL; DR;
Before responding you should know the following:
If you have Qt 5.14 then you must have the most up-to-date components of Qt (stable version).
When you create your project Qt Creator will choose the version of the components depending on the configuration you set in the wizard, but you can change it manually: import QtQuick 2.14.
As the last stable version points out is Qt 5.14 that contains all the most up-to-date stable components, if you want to use the components of a developing version such as Qt 5.15 then you must download the source code and compile it which can be complicated if you are a beginner.
I am using Qt Creator 4.0.3 and when looking at an older project using QtQuick 1.1 and trying to view in the designer, I get "Cannot open this QML document because of an error in QML file: Unsupported QtQuick version (0:0).
"Go to error" brings me to the line import QtQuick 1.1 in my .qml file. I do not know if QtQuick 1.1 is loaded or available nor do I know how to find that info.
I'd guess the reason ist that QtQuick 1 was removed with Qt 5.6 (at least from the release packages).
Qt_5.6 Removed_Modules
Either Qt uses Qt 5.6/5.7 and/or was built with 5.6/5.7
You would need to build and use QtCreator with Qt 5.5 I guess.
I am using Qt Creator 2.4.1 base on Qt 4.7.4(32 bit) on windows. I have to create a table in QML using Table View. When i try import QtQuick.Controls 2.1 i get the error QML MODULE NOT FOUND. Same error on Qt Creator 2.6.2 based on Qt 5.0.1.
Any help appreciated.
In my case running qmake fixed issue.
Update 2020 (new way):
In some cases it not helped. Instead this solution helped greatly.
In the QtCreator, open settings/preferences and go to QtQuick > QtQuick Designer and select Use QML emulation layer... option in Qml Emulation Layer section and get your most newer version of Qt to it as follow:
The module QtQuick.Controls has been added on Qt 5.1 and is currently at the 1.0 version. It also requires you having QtQuick version 2.0, introduced with Qt 5 So if you want to use TableView you would have to update your current Qt version to at least 5.1 and then use these import statement:
import QtQuick 2.0
import QtQuick.Controls 1.0
Also, as indicated by Armaghast in the comment, if you are moving to the latest Qt version (currently Qt 5.2.1) you should use
import QtQuick 2.2
import QtQuick.Controls 1.1
In October 2016, Qt Qtuick Controls 2.1 were released as part of Qt 5.8
If anybody (like me) stumbles upon this error when using someone else code, you need to install Qt 5.8 or newer. Lower versions will fail to run the QML GUI.
More info at: http://blog.qt.io/blog/2016/10/06/qt-quick-controls-2-1-and-beyond/