[Interest] Draw own QQuickItem using OpenGL together with QQuickApplicationEngine
Axel Jäger
axeljaeger at googlemail.com
Sun Dec 6 00:28:51 CET 2015
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.
Attached you will find my modified example. 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.
Best reagards,
Axel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openglunderqml-qmlappengine.zip
Type: application/x-zip-compressed
Size: 6170 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20151206/67bb3d42/attachment.bin>
More information about the Interest
mailing list