[Development] 4.8.2 / QPA / custom window surfaces

Florian Hänel florian.haenel at basyskom.com
Tue Jul 17 00:58:12 CEST 2012


I was told this was the right place to get input to this question.

We have the following setup:
We don't run x11 and this is on embedded Linux.

Our compositing process provides ipc buffers to draw into when an app is in windowed mode. 
In full screen mode, the app acquires a window surface to a egl fs based frame buffer to use native gles to draw to. I use a qglwidget as a viewport for a qgraphicsview to do this.
In windowed mode I intercept the paint event and render the graphics view into the ipc buffer manually.

My question is, how can I use qt idioms to make this more elegant. For example, one idea was to use a custom viewport widget with two window surfaces, one eglfs based, one qimage/ipc buffer based when the app is windowed.
Or would you prefer it if the app had two widgets, one based on the ipc surface, one a qglwidget based on the eglfs frame buffer and have the QPA return the appropriate window surface to each and then have the app exchange the viewport when it gets maximized?
Or could you just return a different paint engine depending on the window status?

Do you know of any platform that had similar considerations?

Florian



More information about the Development mailing list