Details
-
Suggestion
-
Resolution: Fixed
-
P2: Important
-
None
-
None
-
afa15792e (dev), ac9830268 (dev), b14ffff8b (6.5), 0d8cdb7d2 (6.5), d414c81f3 (dev), c504227e2 (dev), 14511ec0d (6.5), bc6abc010 (6.5)
Description
A user was asking how to have a Button that, when clicked, did something in C++. I started looking for documentation that I could share with them.
I found https://doc.qt.io/qt-6/qtdoc-tutorials-alarms-example.html, which is too complex.
I thought https://doc.qt.io/qt-6/qtqml-cppintegration-overview.html might have something, but it doesn't have any concrete examples.
I shared https://www.youtube.com/watch?v=9BcAYDlpuT8, which is too thorough an explanation for such a simple question.
I thought the QML book might have something, but the closest thing it has mentions setContextProperty (https://www.qt.io/product/qt6/qml-book/ch18-extensions-qml-runtime), which is not best practice.
We should add a page of common tasks with straight-forward solutions, as we have for Creator and Qbs:
Attachments
Issue Links
- relates to
-
QTBUG-111770 Gauge control
- Reported
For Gerrit Dashboard: QTBUG-109634 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
461206,19 | Add a how-to page for Qt Quick topics | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
462194,14 | Add how-to for active focus debugging | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
462599,31 | Add an Android TimePickerDialog how-to | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
468821,2 | Add a how-to page for Qt Quick topics | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
468822,2 | Add how-to for active focus debugging | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
469605,4 | Doc: add how-to for using C++ enums in JavaScript | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
470154,2 | Add an Android TimePickerDialog how-to | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
479442,3 | Doc: add how-to for using C++ enums in JavaScript | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |