[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Konqueror lineedit Bug
From:       David Faure <faure () kde ! org>
Date:       2007-11-19 22:34:48
Message-ID: 200711192334.49137.faure () kde ! org
[Download RAW message or body]

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@kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic