summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 58b52a734b..171a3a7e39 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -12506,6 +12506,16 @@ void QWidget::ungrabGesture(Qt::GestureType gesture)
\a m is the metric to get.
*/
+void QWidget::init(QPainter *painter) const
+{
+ const QPalette &pal = palette();
+ painter->d_func()->state->pen = QPen(pal.brush(foregroundRole()), 0);
+ painter->d_func()->state->bgBrush = pal.brush(backgroundRole());
+ QFont f(font(), const_cast<QWidget *>(this));
+ painter->d_func()->state->deviceFont = f;
+ painter->d_func()->state->font = f;
+}
+
/*!
\fn void QWidget::setMask(const QRegion &region)
\overload