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. Qt Quick as OpenGL GUI library
Forum Updated to NodeBB v4.3 + New Features

Qt Quick as OpenGL GUI library

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 3 Posters 2.8k Views 1 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.
  • D Offline
    D Offline
    dobri
    wrote on last edited by
    #1

    Hi guys,

    I was looking around for an OpenGL GUI library when I accidentally came across Qt Quick. I think that QML combined with QML Components for Desktop can perfectly fit my needs. Therefore I have some questions:

    1. Do you think that QML can be easily integrated into OpenGL application (written in C++). I want QML to be used only for the UI (i.e. for dialogs, sliders, check boxes, radio buttons) so the user can easily modify some of the properties/settings of the program. Absolutely no other logic.

    2. What will be the performance penalty? Do you think that QML will show down dramatically the application frame rate?

    3. I found very nice looking Qt Quick applications here: http://quitcoding.com/?page=work (Qt5 Cinematic Experience is my favourite). Unfortunately the whole application is written entirely using QML (there is not C++ backend). Can you point me out some demos (preferably with source code) where QML is mixed up with C++ and OpenGL and Qt Quick is used only for the GUI?

    Thanks in advance for any advice, answer or guidance.

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      I don't know about this one. You would have to experiment with this, but it definitely seems possible (take a look at QDeclarativeView/QQuickView).

      Impossible to say. How would you judge the penalty? What would you compare it to? In general, Qt QUICK 1 is painted using Qt's raster engine, which is very fast, but software-bound. Qt QUICK 2 is based on Qt Scenegraph, which paints using OpenGL. That does not answer your question, though, and I don't know what would. Of course, QML comes with it's own engine, JS engine and hooks up to meta object system, but I can't say how it will affect performance in your project.

      It's probably too complicated an example,but you can take a look at my "CCF":https://github.com/sierdzio/closecombatfree. Logic is mixed, but right now I moved most out of QML into C++. Either way, it's rather straightforward. I find it easy and fast to prototype using QML with JavaScript, and then, when API solidifies, I move it to c++. Mostly for fun, as there is no visible performance loss at that level of complexity. QML also comes with good documentation on integration with C++, you can see it "here":http://qt-project.org/doc/qt-4.8/qtbinding.html. There is more, of course, but that's a good starting point.

      (Z(:^

      1 Reply Last reply
      0
      • C Offline
        C Offline
        chrisadams
        wrote on last edited by
        #3

        Hi,

        Take a look at "QtMediaHub":http://qt-project.org/wiki/QtMediaHub for a decent example of mixing QtQuick and C++ in a real-world application.

        Cheers,
        Chris.

        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