Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Learning QML with the MVC approach
Hi fellow programmers,
I'm trying to learn QML and having some success with it. One thing I'm trying to implement now is using the MVC (Model, View, Controller).
Right now, I'm trying to get an updated reference. I found multiple sources on YouTube, but when I typed in the code, it doesn't work. I'm assuming because of the differences in versions. So with that said, can you tell me where I can get the most updated reference and does some prior versions of qt compatible with some of the latest?
MartinH last edited by
I'm not a specialist into QML and MVC approach but I think that what your are searching is :
M : Model -> C++ backend
V : View -> The QML code
C : Controller -> C++ backend
To mix qml and C++, you can see here http://doc.qt.io/qt-5/qtqml-cppintegration-topic.html and here http://doc.qt.io/qt-5/qtqml-cppintegration-interactqmlfromcpp.html
is that help you ?
Thanks a lot for the information. It was a YouTube tutorial that showed the model being implemented with QML. The tutorial, however, was about 2 years old and I was not willing to use the instructor version of QML when there is a much newer version. Thanks again!!
mcosta last edited by
Hi and welcome to devnet,
why do you use YouTube as reference?
The Qt documentation is full of examples about how to use MVC.
I can watch hours of videos at a time, which would allow me to learn more about Qt during a single day. If I were to read the content from the website, I would lose focus after 3 hours...lol. :)