Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. The Lounge
  4. QML vs QGraphicsView and friends
QtWS25 Last Chance

QML vs QGraphicsView and friends

Scheduled Pinned Locked Moved The Lounge
11 Posts 4 Posters 11.0k 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.
  • K Offline
    K Offline
    kkrzewniak
    wrote on 9 Mar 2011, 23:47 last edited by
    #1

    As far as I know QML is built atop of the QGraphicsView framework. So what are the benefits of using QML against using QGraphicsView directly. I'm looking for something that will give me the push I need to finally get to know QML, because for now I still feel that anything that can be done using QML can also be achieved using QGraphicsView directly (granted with more code but I actually like C++ so …).

    Me, Grimlock, not "nice dino". ME BASH BRAINS!

    1 Reply Last reply
    0
    • A Offline
      A Offline
      Alicemirror
      wrote on 10 Mar 2011, 00:12 last edited by
      #2

      This is not a question about how you like C++: the fact is that using QML and QT-Quick to develop the User Interface you can work with a descriptive language and separate the interface from logic. This is the best way to develop for mobile platforms, if you think that interface is subject to changes while logic can maintain totally intact its robustness working in a compiled - and in someway "protected" - environment independent by the user experience.
      Last, but not less important, the features and capabilities of QML for create impressive layouts and High quality grpahics.

      Enrico Miglino (aka Alicemirror)
      Balearic Dynamics
      Islas Baleares, Ibiza (Spain)
      www.balearicdynamics.com

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kkrzewniak
        wrote on 10 Mar 2011, 08:29 last edited by
        #3

        bq. QT-Quick

        Please
        Qt != QT so its QtQuick not QTQuick

        bq. separate the interface from logic

        bq. Last, but not less important, the features and capabilities of QML for create impressive layouts and High quality grpahics.

        And You think this is not the case with QGraphicsView why?
        Don't get me wrong I know that its easier to do this with QML, but as with everything that operates at a higher level you do get performance penalties.

        Me, Grimlock, not "nice dino". ME BASH BRAINS!

        1 Reply Last reply
        0
        • A Offline
          A Offline
          Alicemirror
          wrote on 10 Mar 2011, 08:44 last edited by
          #4

          As a linux-embedded developer, I have so clear what you means. Higher level penalizes ALWAYS performances.
          The thing that I appreciate is that with QML a part of the application can be external from the C++ complexity and is a language with interpreted sources. This mix can be a great potential is you think that your C++ can manipulate and change the QML sources after the application is installed on the device.

          I imagine that you can replicate that there is also a Qt-script,but I had not yet had time to consider in-depth this options.

          (don't get me wrong if sometimes I write QT... I hate Q(uick)T(ime) :) )

          Enrico Miglino (aka Alicemirror)
          Balearic Dynamics
          Islas Baleares, Ibiza (Spain)
          www.balearicdynamics.com

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andre
            wrote on 10 Mar 2011, 09:44 last edited by
            #5

            That performance penalty may nor may not apply. You might be able to use optimizations in QML written by an engineer better/smarter than you (as in you in general, not personal) and that would be possible to write by hand in C++, but may never actually get written. Also, while QML is currently build on the GraphicsView framework, it is perfectly possible to make it work on a different graphical backend. In fact, that is the goal of the QML-scenegraph project. You will not be able to get the kind of speedups you get then with GraphicsView or anywhere else in the QWidget world.

            The main benefit of using QML is that you are able to get to a result quicker and write less interaction and state management code, while at the same time being able to easily work closely with a designer on the UI. The time you save there, can be spend optimizing the real performance issues in your application. I am not claiming QML is perfect; in fact I think it still needs a lot of work to be usable for building real applications, but it does show real promise. I just hope it will stay around a bit longer as some other technologies we have seen introduced in Qt over the last couple years...

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Alicemirror
              wrote on 10 Mar 2011, 09:50 last edited by
              #6

              Andre, I totally agree with you.

              I think that it sound little "partisan" that C++ is best. For my experience, the best solutions are always integration solutions, where the right language (or more complex language-based platform) is used, depending by the context.

              As a matter of fact, an in-depth analysis demonstrate that both QML and C++ (like java and/or Python where needed) are both on the same "development" level, not high level and low-level language.

              Enrico Miglino (aka Alicemirror)
              Balearic Dynamics
              Islas Baleares, Ibiza (Spain)
              www.balearicdynamics.com

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mario
                wrote on 10 Mar 2011, 09:52 last edited by
                #7

                I don't know all the technical details but what I understand is that making fast QML as a developer is quite easy because the authors of QML have made the best possible solution for the use-case. Making fast QGrahicsView might not be that easy, you have to learn quite a bit about the graphics view system.

                With QML, the trolls can accomplish things like QML scenegraph (http://labs.qt.nokia.com/2010/12/02/velvet-and-the-qml-scene-graph/) which I'm looking forward to.

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  kkrzewniak
                  wrote on 10 Mar 2011, 10:32 last edited by
                  #8

                  [quote author="Andre" date="1299750263"]That performance penalty may nor may not apply. You might be able to use optimizations in QML written by an engineer better/smarter than you (as in you in general, not personal) and that would be possible to write by hand in C++, but may never actually get written. Also, while QML is currently build on the GraphicsView framework, it is perfectly possible to make it work on a different graphical backend. In fact, that is the goal of the QML-scenegraph project. You will not be able to get the kind of speedups you get then with GraphicsView or anywhere else in the QWidget world.

                  The main benefit of using QML is that you are able to get to a result quicker and write less interaction and state management code, while at the same time being able to easily work closely with a designer on the UI. The time you save there, can be spend optimizing the real performance issues in your application. I am not claiming QML is perfect; in fact I think it still needs a lot of work to be usable for building real applications, but it does show real promise. I just hope it will stay around a bit longer as some other technologies we have seen introduced in Qt over the last couple years...[/quote]

                  Thanks Andre that’s what I wanted to hear. I was not aware of that QGraphicsView would not benefit from scenegraph. Getting a significant speed-up combined with the ease of QtQuick is a truly grate prospect.

                  bq. I think that it sound little “partisan” that C++ is best.

                  I never stated that C++ is a the best solution to every problem. I just wanted to know what were the benefits of QML over direct QGraphicsView usage.

                  I also wonder if there are any QtQuick books in the pipeline as I have always enjoy good reading material and am currently enjoying "Advanced Qt Programming" by Mark Summerfield.

                  Me, Grimlock, not "nice dino". ME BASH BRAINS!

                  1 Reply Last reply
                  0
                  • A Offline
                    A Offline
                    Alicemirror
                    wrote on 10 Mar 2011, 10:47 last edited by
                    #9

                    kkrzewniak,

                    me, as technical book writer, can tell you that what you can find on the net and on these forums is incomparable for helping, understanding and teaching to you. Too much times I started writing the editor commitment, then when the book is finished the best thing to do is that I rewrite the book ;)

                    Enrico Miglino (aka Alicemirror)
                    Balearic Dynamics
                    Islas Baleares, Ibiza (Spain)
                    www.balearicdynamics.com

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      kkrzewniak
                      wrote on 10 Mar 2011, 18:16 last edited by
                      #10

                      This might be the case with some books but I really prefer reading nicely published books to reading from the screen. And some thing cant be found on the net (non Qt related topics) and next to the documentation good books are the best learning source.

                      Me, Grimlock, not "nice dino". ME BASH BRAINS!

                      1 Reply Last reply
                      0
                      • A Offline
                        A Offline
                        Alicemirror
                        wrote on 10 Mar 2011, 18:21 last edited by
                        #11

                        I can suggest an e-ink based reader, then I can share my waste bibliography...

                        Sure!

                        Enrico Miglino (aka Alicemirror)
                        Balearic Dynamics
                        Islas Baleares, Ibiza (Spain)
                        www.balearicdynamics.com

                        1 Reply Last reply
                        0

                        10/11

                        10 Mar 2011, 18:16

                        • Login

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