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. QML or Widgets
Forum Updated to NodeBB v4.3 + New Features

QML or Widgets

Scheduled Pinned Locked Moved Unsolved General and Desktop
8 Posts 6 Posters 13.7k 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.
  • M Offline
    M Offline
    maxwell31
    wrote on 17 Jan 2018, 11:15 last edited by
    #1

    Hi,

    I have to develop a data analysis desktop software which will need to do quite a bit of plotting. I wanted to use QGraphicsView for making my plots. Then I read http://blog.qt.io/blog/2017/01/19/should-you-be-using-qgraphicsview/ where the opinion is to use QML instead of QGraphicsView. This makes me wonder whether I should choose QML over Widgets? I have not too much experience with both.

    R 1 Reply Last reply 17 Jan 2018, 11:50
    0
    • M maxwell31
      17 Jan 2018, 11:15

      Hi,

      I have to develop a data analysis desktop software which will need to do quite a bit of plotting. I wanted to use QGraphicsView for making my plots. Then I read http://blog.qt.io/blog/2017/01/19/should-you-be-using-qgraphicsview/ where the opinion is to use QML instead of QGraphicsView. This makes me wonder whether I should choose QML over Widgets? I have not too much experience with both.

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 17 Jan 2018, 11:50 last edited by
      #2

      @maxwell31
      Without more information the (my) thumb rule is:
      When you plan to target desktop systems, go with QtWidgets.
      If you want to go for mobile devices, go with QML.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      B 1 Reply Last reply 18 Jan 2018, 03:26
      1
      • M Offline
        M Offline
        maxwell31
        wrote on 17 Jan 2018, 12:48 last edited by
        #3

        Some more information: The software is about controlling a laboratory device form a PC. But it should not only controll the device, it should also offer a lot of data analysis and visualization. Most likely this software will be in use for the next 15 years.

        M R J 3 Replies Last reply 17 Jan 2018, 12:53
        0
        • M maxwell31
          17 Jan 2018, 12:48

          Some more information: The software is about controlling a laboratory device form a PC. But it should not only controll the device, it should also offer a lot of data analysis and visualization. Most likely this software will be in use for the next 15 years.

          M Offline
          M Offline
          mrjj
          Lifetime Qt Champion
          wrote on 17 Jan 2018, 12:53 last edited by mrjj
          #4

          @maxwell31

          Hi
          There is nothing to stop you from using both.
          Say c++ for controlling and widgets for that part and QML for
          plotting etc.
          Also if you keep a clear separation between data / processing and the
          presentation. It wont be that hard to switch GUI later.

          1 Reply Last reply
          1
          • M maxwell31
            17 Jan 2018, 12:48

            Some more information: The software is about controlling a laboratory device form a PC. But it should not only controll the device, it should also offer a lot of data analysis and visualization. Most likely this software will be in use for the next 15 years.

            R Offline
            R Offline
            raven-worx
            Moderators
            wrote on 17 Jan 2018, 12:55 last edited by
            #5

            @maxwell31 said in QML or Widgets:

            Some more information: The software is about controlling a laboratory device form a PC. But it should not only controll the device, it should also offer a lot of data analysis and visualization.

            i meant what are the contents of the application, what type of visualizations, what controls are you planning, etc.
            But i still think QtWidgets its the way to go for you.
            For the basic GUI see the QtWidgets module.

            For the data visualizations you can check out the QtDataVisualization and QtCharts module.
            Both modules also provide QML types, but still i suggest you should go with QtWidgets.

            Most likely this software will be in use for the next 15 years.

            thats a hard promise to keep up to nowadays ;)

            --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
            If you have a question please use the forum so others can benefit from the solution in the future

            1 Reply Last reply
            3
            • M maxwell31
              17 Jan 2018, 12:48

              Some more information: The software is about controlling a laboratory device form a PC. But it should not only controll the device, it should also offer a lot of data analysis and visualization. Most likely this software will be in use for the next 15 years.

              J Offline
              J Offline
              J.Hilk
              Moderators
              wrote on 17 Jan 2018, 13:03 last edited by
              #6

              hi @maxwell31
              @raven-worx rule of thumb is usually correct, but let me expand a bit why thats the case.

              QWidgets have no native GPU-support so everything you show/animate etc will be rendert by the CPU. For basic buttons, icons, and images that is no problem, neither for desktop pcs nor mobile devices.
              You can create GPU-supported QWidgets(e.g. QOpenGLWidget) but that is time consuming and compicated.

              QML has native GPU-Support that makes it the predestined type for "fancy" UI-s with lots of animations, slides, movies, fadeins, fade outs or for your case rapidly changing plot values.
              But as a interpreter language, its "relatively" slow in calculating stuff, say Pixel manipulation or calculating plot points.

              But there is nothing stopping your from mixing both languages.

              Main QML-Application with cpp-backend
              or
              Main cpp-application with QML-Enging to display stuff.

              you can even have a QWidget - UI with QML- Widgets


              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.

              1 Reply Last reply
              1
              • R raven-worx
                17 Jan 2018, 11:50

                @maxwell31
                Without more information the (my) thumb rule is:
                When you plan to target desktop systems, go with QtWidgets.
                If you want to go for mobile devices, go with QML.

                B Offline
                B Offline
                BKBK
                wrote on 18 Jan 2018, 03:26 last edited by
                #7

                @raven-worx
                I like your rule of thumb. Our devices are not really mobile but are small and embedded. May I presume that for your rule they are equivalent?
                I am a newbie to QML files. Please point me to a good description and difference between QML and QtWidgets.

                KevinMQtK 1 Reply Last reply 15 Oct 2019, 15:03
                0
                • B BKBK
                  18 Jan 2018, 03:26

                  @raven-worx
                  I like your rule of thumb. Our devices are not really mobile but are small and embedded. May I presume that for your rule they are equivalent?
                  I am a newbie to QML files. Please point me to a good description and difference between QML and QtWidgets.

                  KevinMQtK Offline
                  KevinMQtK Offline
                  KevinMQt
                  wrote on 15 Oct 2019, 15:03 last edited by
                  #8

                  @BKBK The Qt Documentation is a great resource for the differences between QML and QT Widgets. You can start here. https://doc.qt.io/qt-5/topics-ui.html
                  For embedded, Bo Thorsen (CEO of Viking Software) says QML is good for Embedded because:

                  1. It's well suited for adding animation.
                  2. It's great for simple UI's.
                  3. Creating your own custom look'n'feel UI.

                  The talk is from 2017: https://www.youtube.com/watch?v=Vh7BxaYuszo
                  (21:36 - 24:05)

                  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