Details
-
Task
-
Resolution: Done
-
P2: Important
-
None
-
None
Description
The wizard for Qt Quick propose a certain style on how purely declarative .qml.ui files can be used in components and augmented by logic. e.g. the Qt Quick Controls 2 wizard produces a Page1.qml file
import QtQuick 2.7 Page1Form { button1.onClicked: { console.log("Button Pressed. Entered text: " + textField1.text); } }
Anyhow, following the example to implement textField1.onEditingFinished fails:
textField1.onEditingFinished: { console.log(textField1.text) } // ... qrc:/main.qml:17 Type Page1 unavailable qrc:/Page1.qml:9 ".onEditingFinished" is not available due to component versioning.
Apparently one has to use a much more verbose syntax then:
Connections { target: textField1 onEditingFinished: { console.log(textField1.text) } }
It is unclear to me when the simple slot works, and when one has to use a Connections element.
Attachments
For Gerrit Dashboard: QTCREATORBUG-18820 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
204489,10 | Allow exported signal handlers for signals with revision | dev | qt/qtdeclarative | Status: MERGED | -2 | 0 |