[Qt-interest] Problem with stylesheets in Qt 4.5.0.

Alexandre Beraud aberaud at infflux.com
Mon Apr 6 13:33:56 CEST 2009


Hi trolls,

I have compiled a Qt 4.4.3 code with 4.5.0 on Windows with MSVC 2005 and 
I experiment a weird issue. I apply a stylesheet to a QDialog subclass 
called, say, MyDialog:
    setStyleSheet(
        "MyDialog {"
            "background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,"
            "stop: 0 rgba(0,0,0,0%), stop: 1 rgba(0,0,0,25%));"
        "}"
    );
With Qt 4.4.3 it displays a transparent gradient, but with Qt 4.5.0 the 
whole screen is black. Using opaque colors works correctly, it just 
happens that transparency is not handled. In the other hand, when  I 
apply the same stylesheet to a simple QWidget the result is correct. 
Re-implementing paintEvent() as suggested in the Qt 4.3 documentation 
doesn't help.
Any hint ?

Thanx,

Alex

-- 
BERAUD Alexandre
Ingénieur Développement

Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site :  www.infflux.com





More information about the Qt-interest-old mailing list