summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Eliasson <andreas.eliasson@qt.io>2023-02-14 12:52:05 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2023-02-15 15:22:05 +0000
commit16d67bcb3dba5bdd6facb0e4334ebed897363938 (patch)
tree688c6deea2d8248cf13aa02cccddfccb6be3e76e /src
parent65b4031e7ac457da626a3d7581c835130280a656 (diff)
downloadqtbase-16d67bcb3dba5bdd6facb0e4334ebed897363938.tar.gz
Doc: Fix member name in code snippet
QstyleOption has no init() member, only initFrom(). Fixes: QTBUG-107770 Change-Id: I00ff0b980fbfac813f113a7052bd3df32c7912b6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit d6bdc5e9b6bcc9324c506c194bc168cdb6ec1da7) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/doc/snippets/code/doc_src_stylesheet.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp b/src/widgets/doc/snippets/code/doc_src_stylesheet.cpp
index 7fbcc493de..91851f8f07 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);
}