[Development] Proposal: Make QPen non-cosmetic by default

Uwe Rathmann Uwe.Rathmann at tigertal.de
Mon Oct 15 21:36:19 CEST 2012


On Mon, 15 Oct 2012 09:58:20 +0200, Samuel Rødal wrote:

> Could you elaborate on what you mean regarding the implementation of the
> subsurfaces concept?

This is an experience from a project I'm working on: 
http://www.youtube.com/watch?v=8Zgnv-qz744

I spend some time on trying to embed an OpenGL widget into an application 
using Qt/Embedded. These attempts were made with Qt 4.6 and Qt 4.7 - so 
please excuse me when everything written below is obsolete for the 
versions of Qt you are interested in.

When you have a look at the configure script for Qt 4.8 you will find a 
compiler flag "Q_BACKINGSTORE_SUBSURFACES" that gets enabled as soon as 
you enable OpenGL. Its effect is that you can have surfaces with a 
different paint engine inside of another surface - what you need when you 
have an OpenGL widget embedded in a regular top level window.

With Qt 4.6 I noticed that the translation of the widget content to 
screen coordinates was broken ( wrong regions were updated ) only when 
enabling Q_BACKINGSTORE_SUBSURFACES - even without using any OpenGL 
widget. I spent some time on fixing these bugs ( I remember reading 
comments in the Qt code, showing that the developer was aware of the 
problems ) and provided some patches that made it into Qt 4.7. ( You 
might find the history in the Qt bug tracking system or maybe together 
with the applied patches )

But when really trying to work with OpenGL I came across many other 
problems. F.e. I remember that OpenGL surfaces are always sorted on top 
of regular surfaces ignoring the window stack. I found several situations 
where the framework tries to restore the screen from some cache that 
doesn't exist for a OpenGL surface ...

Unfortunately at that time the usual answer from the Qt support was that 
QPA will be the future and nobody wants to touch QWS anymore. QPA with Qt 
4.8 was then declared ( on the mailing list ) as "not yet worth to be 
documented" ( please excuse me, when I don't have the words exactly in 
memory ) and with Qt 5.0 OpenGL/ES 1.x ( this is all we have for our 
different boards ) is not supported any longer.

Not to mention, that in the embedded world you can't simply change the 
hardware for many years.

Uwe



 






More information about the Development mailing list