Konqueror lineedit Bug

David Faure faure at kde.org
Mon Nov 19 22:34:48 GMT 2007


On Monday 19 November 2007, Rafael Fernández López wrote:
> Hey,
> 
> > At least please set the font in the constructor, not in the paintEvent!
> > A very weird place for changing a widget's font, since setFont triggers a
> > repaint...
> 
> Yeah, on the constructor it was ignored, because of what Albert found. There 
> is a nice warning on setFont method telling that it cannot be used with style 
> sheets, what KLineEdit uses for painting the clear icon.
> 
> That was my desperate solution (the method called on the paintEvent method), 
> and Albert found the problem itself. That was a big warning that I badly 
> missed.

I remember reporting a similar bug the first time I used a stylesheet...
In fact it's one of the reasons I moved away from using a stylesheet at all.

I forgot though: does it work if the setFont is done in event() when ev->type() == QEvent::Polish?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list