PDA

View Full Version : Force redraw of QSimpleRichText when QStyleSheet changes



SHesselbarth
11th April 2006, 10:38
Hi,

working with Qt3 I implemented a simple text viewer widget derived from QScrollView using QSimpleRichText for rich text drawing. The text viewer supports some additional tags I use for different font/color styles. The extended QStyleSheet is set as QApplication's default style sheet and each QSimpleRichText gets this style sheet when instantiated, too.

Regarding to font/color changes to the style sheet's extra tags I am wondering what the most efficient (if any) method of redrawing/updating the QScrollView's content is, so that these changes are reflected properly.

Thanks in advance,

Sebastian Hesselbarth

SHesselbarth
12th April 2006, 16:10
For all those who are interested in a solution:

It looks like the QSimpleRichText is unable to react on stylesheet changes, so deleting and recreating the richtext objects seems to be the only "workaround".