PDA

View Full Version : Problem with OpenGL support (transparent background)



developer-nsk
2nd November 2009, 19:31
There is a map, which is the QGraphicsScene and displayed by QGraphicsView. User can manage this map with widgets (QWidget), the parent of which is QGraphicsView. Widgets are drawn on a transparent background by default, everything looks like maps.google.ru. However, there is a problem - if I change the viewport() for QGraphicsView, like widgets of map management ceases to be updated background, ie the background ceases to be transparent and widget stupidly redraw over previous background. Viewport should be changed to enable / disable of OpenGL support. I understand that the change of viewport also need something to change for widgets that they perceived as a new viewport background, but what exactly? How to make widgets control of map draw on a transparent background after changing the viewport? I will be deeply grateful for the help!