Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Should I prefer QML over plain C++?

Should I prefer QML over plain C++?

Scheduled Pinned Locked Moved Solved General and Desktop
6 Posts 4 Posters 1.9k 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.
  • b2softB Offline
    b2softB Offline
    b2soft
    wrote on last edited by
    #1

    Hello. I need to redesign my desktop software (like new Reload version) and I'm a bit confused. New GUIs provided by UI/UX designer need animations and opacity/position animations.
    First version of my program uses only QT Designer created forms with QSS for style handling. So, please give me advise, should I prefer QML for animations/transitions/UI, or hardcode it in some way in QT Designer/Sources?
    What are pros and cons using both methods (QML vs C++) to handle animations?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      Sunfluxgames
      wrote on last edited by
      #2

      QML are very efficient when it comes to update a scene frame after frame to produce a smooth animation. QML has a issue where it must resolve dynamic types or create data-structures to represent property bindings and go through the Qt meta object type system to access any native member.

      Almost all of which C++ performs equivalently at compile time. As long as you create QML's that can be accomplished with asynchronous Loaders or by pre-loading components it shouldn't matter.

      1 Reply Last reply
      2
      • b2softB Offline
        b2softB Offline
        b2soft
        wrote on last edited by
        #3

        Is it complicated to rework project from simple C++ + QT Designer designed forms to QML-based GUI? Should I need to use other IDEs/Editors to work with QML?

        Sorry for idiot question, but is QML a QT's implementation of MVC idiom?

        C ? 2 Replies Last reply
        0
        • b2softB b2soft

          Is it complicated to rework project from simple C++ + QT Designer designed forms to QML-based GUI? Should I need to use other IDEs/Editors to work with QML?

          Sorry for idiot question, but is QML a QT's implementation of MVC idiom?

          C Offline
          C Offline
          Charlie_Hdz
          wrote on last edited by
          #4

          @b2soft QML is a declarative language which is easier to do animations than Qt Widgets class related with pictures and animations.

          QML has a strong relation with Qt Core classes... but I'm not sure about any relation to MVC... I'll bet there is none.

          Kind Regards,

          Carlos

          Kind Regards,
          Enrique Hernandez
          gearstech.com.mx
          chernandez@gearstech.com.mx

          1 Reply Last reply
          0
          • b2softB b2soft

            Is it complicated to rework project from simple C++ + QT Designer designed forms to QML-based GUI? Should I need to use other IDEs/Editors to work with QML?

            Sorry for idiot question, but is QML a QT's implementation of MVC idiom?

            ? Offline
            ? Offline
            A Former User
            wrote on last edited by
            #5

            @b2soft said in Should I prefer QML over plain C++?:

            Is it complicated to rework project from simple C++ + QT Designer designed forms to QML-based GUI?

            Depends. With QML you can't use Qt Widgets but you'll use QtQuick Controls instead. They are quite feature complete but not as full-blown complete as Qt Widgets. If you have a simple GUI already then it will be easy to port it to QML. If you have custom Widgets then you'll have to reimplement them in QML first.

            1 Reply Last reply
            1
            • b2softB Offline
              b2softB Offline
              b2soft
              wrote on last edited by b2soft
              #6

              @Wieland I use only simple labels/etc stuff stylized using QSS. There are no custom widgets at all.
              Thanks for answers!

              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