[Qt-qml] Problems rendering QML from within a QDeclarativeView
Henry Gomersall
heng at cantab.net
Fri Jun 10 18:16:29 CEST 2011
On Thu, 2011-06-09 at 22:40 -0700, Bradley Smith wrote:
> The demo code is overly complex. Below is a simplified version which
> solves several problems.
>
Yes, I appreciate that. The code was as it was because I actually *do*
need to render to the background OpenGL scene. However, the simplified
version was very useful in sorting the 1-pixel border issue. It came
down to default style for the QGraphicsView having a border around it.
Simple fix:
self.setStyleSheet('QGraphicsView { border-style: none; }')
in __init__ for GraphicsView. (actually, this highlighted another
problem that I didn't clear the background of the OpenGL, so it was
filled with all sorts or detritus. This is fixed in the github .py
file).
> The transparency problem does not occur for me with the original code
> or the code below. Perhaps it is an OpenGL driver problem?
Yes, it seems to be a driver issue. It works fine on another machine of
mine.
Many thanks,
Henry
More information about the Qt-qml
mailing list