[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Using StyleSheets is bad WAS Re: Konqueror lineedit Bug
From: David Faure <faure () kde ! org>
Date: 2007-11-19 23:29:40
Message-ID: 200711200029.40452.faure () kde ! org
[Download RAW message or body]
On Tuesday 20 November 2007, Aaron J. Seigo wrote:
> no. what you WANT to do is implement QWidget::changeEvent(QEvent*) and when
> you get a QEvent::FontChange update the stylesheet if needed.
You mean adding the font name into the CSS code? This seems to be the only way \
indeed. However, watch out for the infinite loop:
setFont calls FontChange calls setStyleSheet calls QStyleSheetStyle::repolish(w) \
calls updateWidgets calls style->polish(w) calls QStyleSheetStyle::setPalette() calls \
w->setFont, GOTO 10. Somehow you'll have to distinguish "setFont done by the user" \
from "setFont done by the style". No idea other than a nasty boolean-based \
re-entrancy protection...
--
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