[Qt-interest] Embedded Widgets - Blending Artifacts
Willy P
willy.lists at gmail.com
Mon Oct 5 01:32:23 CEST 2009
Ok, I've narrowed things down a bit.
Instead of using a QLinearGradient as the background brush, I'm using
solid black and it's blending perfectly:
http://dl.getdropbox.com/u/147719/Pic-12.png
In the constructor of the parent widget I'm calling:
QPalette p = palette();
p.setBrush( QPalette::Window, QBrush( QColor( Qt::black ) ) );
setPalette( p );
Whereas before I was setting the QBrush to this gradient:
QLinearGradient lg( 0, 0, 0, 30 );
lg.setColorAt( 0, QColor( 141, 141, 141 ) );
lg.setColorAt( .5, QColor( 78, 78, 78 ) );
lg.setColorAt( .50001, QColor( 50, 50, 50 ) );
lg.setColorAt( 1, QColor( 50, 50, 50 ) );
Am I using gradients incorrectly?
Thanks,
-Willy
On Sun, Oct 4, 2009 at 3:11 PM, Willy P <willy.lists at gmail.com> wrote:
> Hey,
> I'm embedding a widget in an OpenGL scene and getting some strange effects:
>
> http://dl.getdropbox.com/u/147719/Pic-10.png
>
> Transparencies / blending for widgets in 3d scenes have been messed up
> for a while so I'm trying to make *every* aspect of every widget
> opaque.
>
> Can anybody offer any advice on strategies to deal w/ this bug? I'm
> running OS-X, Qt 4.5.2 and, for this embedded widget, using
> QCleanlooksStyle.
>
> Thanks in advance...
>
> -Willy
>
More information about the Qt-interest-old
mailing list