Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.3.2
-
None
-
0c8bb607e1371b301650029a3e5dfe4641cc2f98
Description
The main documentation page topic is
Exposing Attributes of C++ Types to QML
The subtopic is
Exposing Methods (including Qt Slots).
The c++ code example has this snippet
Message msg;
engine.rootContext()->setContextProperty("msg", &msg);
Then the corresponding QML has this usage
msgBoard.postMessage("Hello from QML")
console.log("Result of
I strongly suspect the C++ code should be:
MessageBoard msgBoard;
engine.rootContext()->setContextProperty("msgBoard", &msgBoard);
<Editorial>Sure wish there was a more "wiki" way to propose an edit to a Qt documentation page.</Editorial>
Attachments
For Gerrit Dashboard: QTBUG-41699 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
96532,4 | Doc: Fixed an error in the QML snippet | 5.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |