Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Starting to use QT, QML and C++
JAC42 last edited by
I am a bit dumbfounded. For the past several months I've been teaching myself C++ in order to use QT, but have found that I might have done so in vain, as the new way seems to use QML, but there are also documents that describe how to use C++ and QML together. Could somebody please clear the air? I am also uncertain how to proceed to learn how to use QT. I have looked at the documentation some, and a tutorial, but find it tough going, and I am in sore need of a good book, but all the books available seem to use QT 4.x. It seems there have been a lot of changes in QT 5.x. I'd really rather not learn yet another language if at all possible, but I'd like to learn the best way to go so that I might do some android and IOS programming. Could somebody explain the current best usage of QT? Might somebody also point out somewhere a better way of moving forward to learn it all?
Thank you very much.
Hi and welcome to devnet,
The trend is to favor QML but Qt's widgets are not dead at all. As for mixing C++ and QML, the idea is to do all the heavy processing, business logic of your application in C++ and the UI in QML so you have a clear/clean separation between the two.
Qt's indeed not simple but still, there's a lot of material and tutorial e.g. "VoidRealms":https://www.youtube.com/user/VoidRealms videos.
Most of what was written for Qt 4 is still valid for Qt 5. The main difference is that the widgets have been moved to their own module and that's what most new users hits when they try book samples.
"QMLBook":http://qmlbook.org is a good start for QML development.
On a side note it's Qt, QT stands for Apple QuickTime
Homer JS last edited by
I'm new to Qt too, just like You I know C++ but I've got some more experience with it, not just a couple of months like You.
I'm not gonna go into where Qt is going or what is better Qt widgets or QML (because obviously I'm not qualified for that) but I'd like to tell you about my experience with Qt.
Now, like SGaist said, there's Qt's great idea to connect the power of C++ with the simplicity(imho) and rich UI features of QML. As stated the idea is great, I personally like it a lot.
They way this connection between QML and C++ should work, with Signals and Slots, C++ function invokes....etc, looks pretty simple too. Just the problem is that (always, imo) there's no learning resources on Qt5 in general (btw. just having a discussion about this here). Whenever I had a problem or qustion about Qt I was linked something from the documentation which (again imo because people here seem to disagree with it) is NOT a way for beginners to learn somethig. So it's pretty (at least it was for me) hard for a newbie, like You and me to grasp how these two (QML and C++) are integrated and how the connections actually work.
I hope You'll find it easier than me to learn Qt because it's a great platfrom.
Here are some nice QML tutorials from this guy called Joseph. They're made with/for Qt5.2 but work in Qt5.4 just as good.
Just my two cents.
SysTech last edited by
LOL... Well like you I have C++ experience but mine is dated. I mean REALLY dated. I think the last real C++ program I wrote from start to finish in C++ was in 1995. Since then I've used it here and there for a quick utility.
Now I'm getting back into it for a fairly large project. I selected Qt because of all the other C++ environments / GUI frameworks, this seemed to be the most complete and well rounded of the frameworks I found. Plus everywhere I turn someone says Qt... So anyway thats why for me is why I'm going to give Qt a good try.
Like you and probably worse, I need to learn a lot. I think you may be further along than me. I haven't even broken the surface of QML.
JAC42 last edited by
Torgeir last edited by
[quote author="JAC42" date="1419913192"]
@color: mouseArea.containsMouse ? "red" : "blue"@