[Qt-interest] BUG ? : OpenGL-powered QGraphicsView and background of containing widget

Oliver Demetz forenbeitraege at oliverdemetz.de
Sun Jun 7 12:52:24 CEST 2009


Hi!

In my main widget I am displaying a QGraphicsView.
This works fine so far.

I can also set the stylesheet of my main widget to use a qlineargradient 
without getting an error:

MyMainWidget {
     background: qlineargradient(x1:0,y1:1,x2:1,y2:0, stop:0 #8D8B8B, 
stop:1 #BEBEBE);
}

As soon as I switch the viewport of the view to a QGLWidget, the 
background-gradient is displayed incorrectly:

mainView.setViewport(new QGLWidget(
     QGLFormat(QGL::SampleBuffers | QGL::Rgba)));

This leads to the behaviour as in the attached scrrenshot: Left without 
the QGLWidget, right with GL acceleration switched on.

Thanks a lot!
Oliver
-------------- next part --------------
A non-text attachment was scrubbed...
Name: with-and-without-GL.jpg
Type: image/jpeg
Size: 75557 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090607/444b8780/attachment.jpg 


More information about the Qt-interest-old mailing list