Translucent QWidget over QGLWidget: weird results

I have a full-sized QGLWidget that draws the background of the application using QPainter (may change to openGL's own commands in the future).

In addition to this QGLWidget, I use QWidgets (not GL) for user interface elements. These are, for example, QLineEdits and QPushButtons. I put them in a custom painted QWidget that uses a translucent background picture. PaintEvents QLineEdit and QPushButton are overwritten and also use translucent backgrounds.

The whole user interface should look like this (This is a screenshot in which I disabled OpenGL and used QWidget instead of QGLWidget for the background. Note the translucent top panel, which also draws a shadow (within its own region)):

Screenshothot

When QLineEdit has focus, it should have a higher opacity, but still not completely opaque:

Screenshothot

So, now with OpenGL turned on (the background is QGLWidget), the translucent widgets above do not draw on top of the background, but on (it looks like) uninitialized data. The image shining through the top panel sometimes represents the entire window, and sometimes other windows located on my desktop.

. , , , , .):

Screenshothot

(: " - , !" ), ( -), ( , , ):

Screenshothot

, : , , , " ".

? ?

, :

  • , . , .
  • - QWidget ( ).
  • paintEvent, () , , , Qt. , paintEvent.
  • , . - AbstractMapView, . AbstractView ( ), , , . , . (, , .)
+5
2

, GL (.. , QGLWidget) Qt. GL- Qt, GL- QLabel /.

http://www.qtcentre.org/threads/40335-QLabel-on-top-of-a-QGLWidget-background-issue

, , , OpenGL- , , Qt , , .

, , GL (.. ), paintEvent QWidget , Qt.

+3

Qframe Qt:: SplashScreen . , , , . , , moveEvent.

-1

All Articles