Where is QtQuick 2.3? - qt

I want to learn qt by using the tutorial below
http://qt-project.org/doc/qt-5/gettingstartedqml.html
The tutorial are using QtQuick 2.3 which I dont have. I only have QtQuick 2.2(autogenerated when creating new project). Where do I find this QtQuick 2.3?
Im just starting Qt few days ago which I downloaded the latest version of Qt. I also try to update using MaintenanceTool.exe. I can confirm that i have the latest version.
Im using the free open source version of Qt.
Where do I find this QtQuick 2.3?

Related

Importing Qt Studio Project in a Qt Creator QML app

I have created a hello world project in Qt Design Studio. Now I need to import QtDS project tree/directory in QtQuick qml app.
The official documentation about this topic is in doc.qt.io/qtdesignstudio/quick-converting-ui-projects. Assuming still this cannot work for you. You can check this post in the Qt forum: how-to-use-qmlproject-ui-qml-forms-from-design-studio-in-qt-creator-pro-project.
So in order to resume the information:
Set all your *.ui.qml files from Qt DS project to a separate *qrc.
Import the new *qrc into your Main Qt Project.

Qt Creator: how to create Qt6 project?

I have installed Qt 6.0.3 and 6.1.0.
And I want to create Qt 6 Quick project.
I start Qt Creator, click "New", "Qt Quick Application - Empty", "Choose...".
Then I type the name of my project and click "Next".
On the "Build System" step I select any build system(qmake, CMake or QBS, it does not affect the next step) and click "Next".
On the next step "Details" there is a drop-down with a list of available Qt versions. But it does not contain Qt 6!
How to create Qt 6 Qt Quick project?
Latest Qt Creator's (4.14.2 at the time of answering) new project assistant does not provide the option to require Qt 6 as a minimal version yet. There is an open bug about the missing feature in Qt Bug Tracker: New project assistant: no minimal Qt version >= 6.0
However, as #JarMan already commented you actually configure your project for specific kit and selecting e.g. Qt 6.0.3 kit means that you configure and build your application against that Qt version.
In fact, minimal Qt version selection in Qt Quick application wizard affects versions of the QML import statements used in generated QML files. E.g. selecting Qt 5.12 as minimal version means that you get import QtQuick 2.12 and import QtQuick.Window 2.12 written to your main.qml. And selecting Qt 5.15 as minimal version means getting import QtQuick 2.15 and import QtQuick.Window 2.15, and so on.
In Qt 6 version numbers may be omitted from imports in QML. If the version is omitted, the latest version will be used.
Most probably it means that when Qt Creator starts supporting Qt 6 as minimal version respective generated import statements will be import QtQuick and import QtQuick.Window.
You can actually edit your generated Qt Quick application so that you manually remove version numbers from import statements if you wish. It will turn your application to minimal Qt6 application because that application cannot be built with Qt5 kits anymore.

How can I know which Qt quick version in my system before importing that?

By qVersion() I will get the Qt version as 5.13.1
But in QML I use import QtQuick 2.12. How to get the QtQuick version C++/QML (2.12)?
I do not know of any way to "print the QtQuick version" (as per your comment on your question). However, reading the docs it seems that it is just a 1:1 mapping between the Qt version and the QtQuick version.
This Qt forum post appears to confirm that post:
Every new Qt release gets a new QtQuick version. It's a 1 to 1 mapping so far: Qt 5.x has QtQuick 2.x (so, Qt 5.4 has QtQuick 2.4). You can check that by opening the documentation for - for example - Rectangle or Item.
Here's the corresponding documentation that shows the mapping of the Qt version and the QtQuick(Controls) version: https://doc.qt.io/qt-5/qtquickcontrols-index.html
From that it would appear that you need to use/import QtQuick 2.13 when you're using Qt 5.13.

Why can't I import Qt3D modules?

I'm going to start a project with Qt Canvas 3D application, but at the moment of importing modules it marks me error because they need those modules that are the following:
import Qt3D 1.0
import Qt3D.Shapes 1.0
Does anyone know how I can attach them? (Download link, download command or some other solution).
Thank you.
Which version of Qt are you using?
Qt 5.4 and newer come with Qt3D 2.0, so it might be that you are following some old tutorial or something, and trying to import Qt3D 1.0 because instead of Qt3D 2.0?
If so, the API has also changed a lot so you would be better off finding an example using Qt3D 2.0 to get you started. Take a look at any examples you have installed that are using Qt3D, and take a lookQt 3D QML Types for an example on importing v 2.0.
Here are some examples for Canvas3D. It's for Qt 5.9, but I think most of them were the same in 5.8. They also come with the Qt creator, just search "canvas 3d" in the welcome screen

Cannot create Qt qml project with Qt commercial charts

Getting error
module "QtCommercial.Chart" is not installed
when trying to import
QtCommercial.Chart 1.3
in qml file
Please help
Assuming you have a commercial license, and have downloaded Charts via the Maintenance Tool... Unlike other Qt modules, Charts does not come pre-built. Only the source seems to be provided (as of Qt 5.2.1). See Digia's QtCharts documentation for instructions on how to build from source, and to include it in your project.

Resources