From f43dc5e5aa07651a27dca69bd067bc782271a227 Mon Sep 17 00:00:00 2001 From: Geir Vattekar Date: Thu, 27 Aug 2009 10:49:27 +0200 Subject: Doc: Widgets may ignore the role set with QWidget::setForegroundRole(). Task-number: 182860 Reviewed-by: Trust Me --- src/gui/kernel/qwidget.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index d39044a..fb5f934 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -4177,6 +4177,10 @@ QPalette::ColorRole QWidget::backgroundRole() const If \a role is QPalette::NoRole, then the widget inherits its parent's background role. + Note that styles are free to choose any color from the palette. + You can modify the palette or set a style sheet if you don't + achieve the result you want with setBackgroundRole(). + \sa backgroundRole(), foregroundRole() */ @@ -4239,6 +4243,10 @@ QPalette::ColorRole QWidget::foregroundRole() const If \a role is QPalette::NoRole, the widget uses a foreground role that contrasts with the background role. + Note that styles are free to choose any color from the palette. + You can modify the palette or set a style sheet if you don't + achieve the result you want with setForegroundRole(). + \sa foregroundRole(), backgroundRole() */ void QWidget::setForegroundRole(QPalette::ColorRole role) -- cgit v0.12