xx.ui.qml files and Qt 6 impossible to get it to work?
-
Hi all,
First of all thanks for reading this topic. For the past 3 days, I have tried to set up a Qt Quick project with version Qt 6.
I haven't had any success so far.. And I think it is time to ask for help so nothing will be thrown out of my window.The following things I have tried to get it to work.
- Installed and uninstalled several times with the newest versions of Qt. See the following picture ->
- Installed on Windows 10
- Compiler CMake
- MinGW
- Standard Qt project work like the coffee example but once I make a new Qt Quick project with CMake:
Than the project compiles and works with no problem. But when I want to use Qt 6 things like QtQuick -> https://doc.qt.io/qt-6/qtquick-index.html or QtQuick Controls 2 -> https://doc.qt.io/qt-6/qtquickcontrols-index.html nothing works anymore and nothing gets recognized.
Mainly I want to use these things in the designer of Qt Creator. But nothing shows up it only gives errors every time I try something it will give another error.
So what I tried then is to use QtQuick 2.4 or something else an older version. That works but when I want to use QtQuick.Controls 2.4 the designer shows the actual controls available but when you add them everything goes bad again the item doesn't show up and there are no properties or anything for that matter.
I have searched a lot on the internet but I couldn't find anything recent about this topic.
I have also put my example project that I am using to test if something works on Github. I have made 2 ui.qml files one called StartUpForm.ui.qml which uses QtQuick 2.4 and QtQuick.Controls 2.4 in the designer in Qt Creator you will see the Qt Controls 2 but when you try to drag and drop them it will give a error. The other named GeneralSetupForm.ui.qml that uses QtQml and QtQuickControls you will see that the program will not load in the page.
Qt Quick with Qt 6 Sample project
I hope one of you guys can tell me what I am missing. Thank you very much in advance!
- Installed and uninstalled several times with the newest versions of Qt. See the following picture ->
-
Please try latest Qt Creator 4.15.0 or Qt Design Studio 2.1 . From what I understand, they should now be able to handle Qt 6 content also in the graphical editor.
-
@kkoehne said in xx.ui.qml files and Qt 6 impossible to get it to work?:
Please try latest Qt Creator 4.15.0 or Qt Design Studio 2.1 . From what I understand, they should now be able to handle Qt 6 content also in the graphical editor.
I uninstalled everything but still no luck. I also made a new project. But at the making of a project screen, I also cannot select Qt version 6 only up to 5.15. Isn't that a problem?
I have also tried the design studio. When I make a new project it works but also in the imports it uses Qt.Quick 2.15 and Qt.Quick.Controls 2.15 and those are not from Qt 6 right? Because than you will need to use QtQml and QtQuick.Controls
-
@RemcoMusic said in xx.ui.qml files and Qt 6 impossible to get it to work?:
Mainly I want to use these things in the designer of Qt Creator. But nothing shows up it only gives errors every time I try something it will give another error.
Not that I know how to fix your problem, but what's the error?
-
@kshegunov said in xx.ui.qml files and Qt 6 impossible to get it to work?:
@RemcoMusic said in xx.ui.qml files and Qt 6 impossible to get it to work?:
Mainly I want to use these things in the designer of Qt Creator. But nothing shows up it only gives errors every time I try something it will give another error.
Not that I know how to fix your problem, but what's the error?
There are several. The problem is I can't reproduce the same error over and over again.
I made a video so you can see what errors pop up etc..I hope you can see what I do wrong.
-
I suggest you file this against QtCreator and its Qt Quick Designer (integration). Possibly 3 bugreports in fact (search the tracker first, though, it/they may exist):
- There is no Qt6 in the dropdown for the form on creation.
- The Qt6 way of specifying the module is without versioning (as you correctly tried)
- Adding a component/quick item to the designer form view doesn't update the tree view on the left (you pointed this out after writing the QtQuick.Controls). There seems to be some caching issue or something, dunno exactly.
I'm not sure if the qml files need to go in the
cmake
file, though, you should check this against the basic example. I've not been able to build Qt6 as of yet, hence I've not given it a spin even. -
@kshegunov Thanks for the fast reply, I searched on the bug report with the following query: https://bugreports.qt.io/browse/QTCREATORBUG-25585?jql=project in (QTCREATORBUG%2C QTBUG) AND status %3D Open AND affectedVersion in (6.0.4%2C "Qt Creator 4.15.0")
Does that mean there is no report on this matter? Or do I need to wider my search parameters?
Thanks for the help!
-
These might be of interest:
https://bugreports.qt.io/browse/QTCREATORBUG-25658
https://bugreports.qt.io/browse/QTCREATORBUG-25637
https://bugreports.qt.io/browse/QTCREATORBUG-25630
possibly this one:
https://bugreports.qt.io/browse/QTCREATORBUG-25624Here's a search query by the appropriate component, look around:
https://bugreports.qt.io/browse/QTCREATORBUG-25658?jql=project %3D QTCREATORBUG AND component %3D "Quick Designer" -
@kshegunov Thanks for the correct query! I've researched the links you stated and I think my problem is before theirs.
That is why I created a new bug report -> https://bugreports.qt.io/browse/QTCREATORBUG-25686
I hope I have made myself clear enough so they will understand the problem.