diff --git a/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp b/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp index 7fbcc493def..91851f8f07c 100644 --- a/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp +++ b/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp @@ -51,7 +51,7 @@ qApp->setStyleSheet("ns--MyPushButton { background: yellow; }"); void CustomWidget::paintEvent(QPaintEvent *) { QStyleOption opt; - opt.init(this); + opt.initFrom(this); QPainter p(this); style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this); }