[Qt-interest] QWidget backgroup to white

Alexandre Beraud aberaud at infflux.com
Tue Dec 1 17:24:58 CET 2009


Hi,

If you draw waves on your widget, then I assume that you have redefined 
the paintEvent() of the widget. In that case why not just call 
QPainter::fillRect() ? Also, if you really want to freely draw on a 
widget, I would advise to use QGraphicsScene/QGraphicsView, and use the 
setBackgroundBrush() method.

Regards,

Alex


Kari Laine a écrit :
> Hi,
>
> really stupid question but I have tried 3 hours now.
> I have a QWidget on which I draw waves. I would like the background to be white.
> How I do that?
>
> I have tried to define white,solid brush and then using setBackground
> but no luck.
>
> Best Regards
> Kari
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>   


-- 
Alexandre BERAUD
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