From 16d67bcb3dba5bdd6facb0e4334ebed897363938 Mon Sep 17 00:00:00 2001 From: Andreas Eliasson Date: Tue, 14 Feb 2023 12:52:05 +0100 Subject: [PATCH] Doc: Fix member name in code snippet QstyleOption has no init() member, only initFrom(). Fixes: QTBUG-107770 Change-Id: I00ff0b980fbfac813f113a7052bd3df32c7912b6 Reviewed-by: Volker Hilsheimer (cherry picked from commit d6bdc5e9b6bcc9324c506c194bc168cdb6ec1da7) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/doc/snippets/code/doc_src_stylesheet.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }