Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qml vs c++ for overall UX?
QtWS25 Last Chance

Qml vs c++ for overall UX?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qml c++ enginec++performance
6 Posts 3 Posters 3.3k Views
  • 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.
  • J Offline
    J Offline
    JulienD
    wrote on last edited by
    #1

    Hi,
    I am diving into QT again, after some work done in other frameworks like React Native and Nativescript.
    But I am a C++ programmer and love that language. I am bored of JS.

    So I decided to give QT a shot for my next Xplatform project.
    I understand we have QML, but I get that it comes with javascript.
    I am concerned about perfs, app size and loading time.

    In 2019, is coding the app in full c++ a better take for performance and smoothness or is qml faster?
    Are we concerned about the data exchange performance hit with java/swift in c++? Does it happen in qml?

    I am experienced in C++, so dev time is not a concern here.
    What are your experiences about this?

    Thanks

    J.HilkJ 1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome back !

      It depends a bit on what you are developing for.

      If a classic desktop application then widgets are perfectly fine.

      If you are targeting mobile then QtQuick will be better. Same as if you want dynamic UIs with effects and that kind of stuff.

      The heavy lifting you can still do in C++ though.

      Performance and memory wise, there have been lots of improvements with the latest releases.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • J Offline
        J Offline
        JulienD
        wrote on last edited by JulienD
        #3

        Thanks SGaist,

        I develop for mobiles.

        So I have to embed javascript anyway (JS<->QML), right?

        Edit: official doc
        Apparently not, but I would like to be sure that JS engine is not embedded that way :)

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          QML is javascript based yes but you already have all the plumbing provided.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J JulienD

            Hi,
            I am diving into QT again, after some work done in other frameworks like React Native and Nativescript.
            But I am a C++ programmer and love that language. I am bored of JS.

            So I decided to give QT a shot for my next Xplatform project.
            I understand we have QML, but I get that it comes with javascript.
            I am concerned about perfs, app size and loading time.

            In 2019, is coding the app in full c++ a better take for performance and smoothness or is qml faster?
            Are we concerned about the data exchange performance hit with java/swift in c++? Does it happen in qml?

            I am experienced in C++, so dev time is not a concern here.
            What are your experiences about this?

            Thanks

            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #5

            @JulienD I wouldn't necessarily categorize QWidget-> Desktop & QML -> Mobile.

            I've done both for both systems. And both work great.

            It's more a question of style and time. It is very easy to make animations of all kinds, to load and place Images where ever you like etc. Also QML comes with native OpenGl support.
            Which makes it indeed a good idea for mobile platforms.

            However if you plan to do a simple ui, some buttons switches texts, etc QWidgets will do just fine.
            You can do everything in QWidgets what you can do in QML, however you'll spend more time setting it up and doing it.

            Qt & QML delivers its very own and tailored JavaScript Host Environment, you as programmer won't have to do anything to set it up.
            More information here

            In the end, as you have experience with c++ and JS I would suggest QML, that way you have basically 4 Languages combined to do what every you fancy.
            c++(the backbone)
            QML(the visuals)
            JS(Object, Array, and Math, properties)
            HTML (this one is a stretch, I only mention it in case you want to make use of the 2d Canvas in QML)


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            J 1 Reply Last reply
            1
            • J.HilkJ J.Hilk

              @JulienD I wouldn't necessarily categorize QWidget-> Desktop & QML -> Mobile.

              I've done both for both systems. And both work great.

              It's more a question of style and time. It is very easy to make animations of all kinds, to load and place Images where ever you like etc. Also QML comes with native OpenGl support.
              Which makes it indeed a good idea for mobile platforms.

              However if you plan to do a simple ui, some buttons switches texts, etc QWidgets will do just fine.
              You can do everything in QWidgets what you can do in QML, however you'll spend more time setting it up and doing it.

              Qt & QML delivers its very own and tailored JavaScript Host Environment, you as programmer won't have to do anything to set it up.
              More information here

              In the end, as you have experience with c++ and JS I would suggest QML, that way you have basically 4 Languages combined to do what every you fancy.
              c++(the backbone)
              QML(the visuals)
              JS(Object, Array, and Math, properties)
              HTML (this one is a stretch, I only mention it in case you want to make use of the 2d Canvas in QML)

              J Offline
              J Offline
              JulienD
              wrote on last edited by
              #6

              @J.Hilk Thank you for your input!

              I will give it a try and come back on this forum if stuck ;)
              Cheers,

              1 Reply Last reply
              1

              • Login

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