Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Learning QML with the MVC approach
Forum Updated to NodeBB v4.3 + New Features

Learning QML with the MVC approach

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 2.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    BernWillChris
    wrote on last edited by
    #1

    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?

    Thanks

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MartinH
      wrote on last edited by
      #2

      Hello :)
      I'm not a specialist into QML and MVC approach but I think that what your are searching is :

      MVC
      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 ?

      B 1 Reply Last reply
      1
      • M MartinH

        Hello :)
        I'm not a specialist into QML and MVC approach but I think that what your are searching is :

        MVC
        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 ?

        B Offline
        B Offline
        BernWillChris
        wrote on last edited by
        #3

        @MartinH

        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!!

        1 Reply Last reply
        1
        • M Offline
          M Offline
          mcosta
          wrote on last edited by
          #4

          Hi and welcome to devnet,

          why do you use YouTube as reference?
          The Qt documentation is full of examples about how to use MVC.

          Once your problem is solved don't forget to:

          • Mark the thread as SOLVED using the Topic Tool menu
          • Vote up the answer(s) that helped you to solve the issue

          You can embed images using (http://imgur.com/) or (http://postimage.org/)

          B 1 Reply Last reply
          0
          • M mcosta

            Hi and welcome to devnet,

            why do you use YouTube as reference?
            The Qt documentation is full of examples about how to use MVC.

            B Offline
            B Offline
            BernWillChris
            wrote on last edited by
            #5

            @mcosta

            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. :)

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved