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. Draw own QQuickItem using OpenGL together with QQuickApplicationEngine
Forum Update on Monday, May 27th 2025

Draw own QQuickItem using OpenGL together with QQuickApplicationEngine

Scheduled Pinned Locked Moved QML and Qt Quick
openglqquickapplicati
1 Posts 1 Posters 750 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.
  • A Offline
    A Offline
    axeljaeger17
    wrote on 30 Nov 2015, 21:29 last edited by axeljaeger17
    #1

    Hello,
    I am trying to start a new application and want to start with the most modern possible codebase so I am looking into different options. The application I want to develop consists of a large OpenGL-View togehter with some slider next to it to change some parameters of the view. I have a large experience in building widget based applications in Qt but just for the fun, I want to go for QML way.

    I found this example that shows how to combine OpenGL-Drawing with with QML-Items:
    http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html

    Then I found the Qt Quick Controls template in QtCreator that uses QQuickApplicationEngine which seems even more sophisticated than just using a QQuickView with a QML-File as a root item.

    I tried adopting the first example to use QQuickApplicationEngine by changing the main-method according to the template and changed the main.qml to use ApplicationWindow instead of Item as the root object. The effect is that I see all the QML Items in a window but the custom opengl drawing is not displayed. I see from the debugger that the opengl drawing code is executed.

    I would like to share my adopted example with you but I am unable to find a way to attach a file here. I guess that I just did something very stupid and the viewport of my custom opengl items is something like 0x0.

    I would be very happy if there was a an example that uses QQuickApplicationEngine to load a qml-file with an ApplicationWindow and that does some OpenGL drawing besides QtQuick based controlls.

    Any help is greatly appriciated.

    1 Reply Last reply
    0

    1/1

    30 Nov 2015, 21:29

    • Login

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