Not able to use QtQuick.controls elements
-
Hello,
sorry for this long and stupid question, but I am realy frustrated...
I tried today to work a bit with qml. I took as a reference this video https://www.youtube.com/watch?v=ZUjHmamwTJA
I installed Qt-creator etc. and if i run one of the code-examples everything works fine.
So now i would like to do the same like in the video, but i am not able to work with QtQuick.controls.
What I am exactly doing is:
- Create a new project of kind: QtQuick application (empty) with Buildsystem qmake and as kit Qt 6.1.1 MinGW 64 Bit
- If I run this I see the "Hello World" default Window (so far so good!)
- Now I add a QtQuick UI-File. This seems to generate a qml file and a ui.qml file
- After this I get the Designer with the loaded ui.qml file
- Now I want to add some buttons and thinks like in the video (it seems my Qt-creator version is newer than in the video (Qt Creator 4.15.1 Based on Qt 5.15.2 (MSVC 2019, 64 bit)
- After this i search in "components" for controls and I find for example QtQuick.Controls.Basic and QtQuick.Controls.Basic.Impl why are there impl and no impl? What does that mean?
Anyway I get nothing to work. I cant just add QtQuick.controls components there because they dont show up.
I see the components of controls if I add "import QtQuick.Controls 2.5" manually to the ui.qmp-file
But if I try to drag and drop one element into the formular editor I get:
Should I be able to load the basic main.qml file in the designer? or only ui.qml-Files. Because if I try this I get an error in the first line, that the emulator crashes
Is maybe something with my installation wrong? (I choosed the default one)
-
okay after a long search (and a simple try on my business notebook where everything works fine) I came across this:
https://bugreports.qt.io/browse/QTCREATORBUG-23455
I set the enviroment variables and restartet the system but nothing changed.
I also tried to update my CPU driver to get a newer version of OPENGL but I already have the newest one from 2016... :-(
So my last attempt is to use an older version of qt and the creator or maybe i need a new notebook...
-
okay after a long search (and a simple try on my business notebook where everything works fine) I came across this:
https://bugreports.qt.io/browse/QTCREATORBUG-23455
I set the enviroment variables and restartet the system but nothing changed.
I also tried to update my CPU driver to get a newer version of OPENGL but I already have the newest one from 2016... :-(
So my last attempt is to use an older version of qt and the creator or maybe i need a new notebook...
Hi
I think you had a paste whoops as the link goes to here. this post.Are you using Qt 6?
Older info might not apply to the Qt6 as they used the milestone version to streamline Qt for
next gen.Ps. If you can run any QML examples. then you dont need new laptop :)
-
Hi
I think you had a paste whoops as the link goes to here. this post.Are you using Qt 6?
Older info might not apply to the Qt6 as they used the milestone version to streamline Qt for
next gen.Ps. If you can run any QML examples. then you dont need new laptop :)
@mrjj Thanks for the hint, I updated the link :-)
I am relative sure that my problem goes in the same direction like the error in the link. Do you have any idea what I could do except QT_OPENGL=software ?
Another attempt would be to use an oder Qt-Version 5.X could that help?
-
@mrjj Thanks for the hint, I updated the link :-)
I am relative sure that my problem goes in the same direction like the error in the link. Do you have any idea what I could do except QT_OPENGL=software ?
Another attempt would be to use an oder Qt-Version 5.X could that help?
@firen
Hi
Yes Using Qt5.15 should just work.
At least i not seen any mention of drag and drop giving errors.Else wait a bit and see if others can give concrete advice. Im more of a QWdigets guy so not been
following QML lately. -
@mrjj everything works fine with Qt 5.15... oh man so much trouble with such a simple solution...
Anyway thanks!