Tom Schindl wrote: > Hi, > > I'm having issues with a Label which is located on a QWigdet which has a > gradient background. When the wiget changes the text the background is > not transparent any more until I resize the window. > > I guess I need to call a method after the text has been set but I can't > find the right one I guess.
The label and the background widget are both repainted properly automatically. The bug is that you are using evt.rect().height(); to decide the dimension of the gradient. You should be using this.height(); instead. When we issue a paintEvent to a widget, we pass along to the QPaintEvent the area that needs update. The first time the widget is shown this will be the whole widget, but when you update a transparent childwidget, the paintevent sent to the parent will only be the bounding rectangle of the child widget. - Gunnar _______________________________________________ Qt-jambi-interest mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest
