Question

I'm having issues rendering using OpenGL with a QQuickItem.

The setup:

I've partitioned the app window into a status bar and a display area. The display area will be used to render output from various Qt plugins. I'm using the QML Loader object to dynamically load the objects from the plugins as needed.

The problem:

I've duplicated the opengl rendering with qml example. If I load it into the display area directly it works perfectly. If I load it into the display area using a Loader it displays nothing. I've logged debugging messages and it's definitely running. I've debugged the app using GDebugger and it appears to be sending OpenGL calls.

Does the loader object mess with the window context?

Any suggestions on how to get this to work?

Is source for the loader object available somewhere?

Was it helpful?

Solution

The problem was not that the custom control wasn't drawing. It was my misuse of QML.

The dynamic loader was adding the content to a 'column' control. The layout controls exhibit 'undefined behavior' if you use them incorrectly. Changing to manual layout using anchors corrected the issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top