QtQuick or Quick/Widget for touch application?
-
Hi, I'm starting a new application.
I state that my experience is exclusively on QTWidget.
I have to make an application that:- Show a map and add images and labels in dynamic overlays.
- Interact with hardware through a C ++ SDK.
- Support the touch screen (have to run on a Windows 10 tablet).
- It must be very very stable and reactivity.
I saw that there is a QtQuick item for the map very simple and I would like to use. Now the possibilities are:
- Write the whole application with QtQuick, but having never used it I don't know its stability and reactivity, C++ inetraction and learning curve.
- Use only the QtQuick item in a normal Widget application, but even here I do not know the stability and responsiveness of a hybrid application (Quick/Widget) and the performance of QtWidget with touch screen.
Someone can help me.
Thanks in advance! -
Well, you will see that gui development with the QtQuick is a way easier. But I can say that, it can be less stable than the Widget some times. I would recommend you to develop your gui with the QtQuick and most of the primal functions with the C++.
Hope you will have success on your work! -
What do you mean with primary functions in C ++? all my functions are in C ++.
Let me explain better, my application consists of a few buttons, and each of these when pressed, via a callback, calls a function of the hardware SDK.
In addition, it must show a map with overlays based on the information that periodically reads with an SDK function. -
@federico.massimi please mention my username next time you answer, so I can see that you have answered :D
Okay, I need to be more spesific. I mean, for example you have a function doThat() in file function1.cpp and a button inside myqmlfile.qml. You can create a registery for the file function1.cpp as a QML registery in main.cppqmlRegisterType<Function1>("function.qml.name", 1, 0, "Function1");
See QML C++ Integration Page for more.
And import your cpp file into myqmlfile.qmlimport function.qml.name 1.0
And create the function for the button press trigger inside myqmlfile.qml
Function1{ id: function1 } Rectangle{ id: buttonbg width: 120 height: 70 radius: 8 color:"black" anchors.centerIn: parent Text{ anchors.centerIn: parent text:qsTr("Do Function") font.pixelSize: 18 color: "white" } MouseArea{ anchors.fill: parent onClicked: { function1.doThat() //will execute your function on clicked } onPressed: { buttonbg.color = "#1c1c1c" //to change bgcolor on pressed } onReleased: { buttonbg.color = "black" //to change bgcolor on released } } }