Try changing the signal's signature to have an int instead of the enum.
Or use the property binding approach.
Cheers,
_
Try changing the signal's signature to have an int instead of the enum.
Or use the property binding approach.
Cheers,
_
Ok, but binding works only in QML=>C++ way, not vice versa, as seen in http://doc.qt.io/qt-5/qml-qtqml-binding.html#details, what I need is update QML element based on C++ class member value:
and the last sentence in the mentioned docs states:Detailed Description
Binding to an Inaccessible Property
Sometimes it is necessary to bind to a property of an object that wasn't directly instantiated by QML - generally a property of a class exported to QML by C++. In these cases, regular property binding doesn't work. Binding allows you to bind any value to any property.
For example, imagine a C++ application that maps an "app.enteredText" property into QML. You could use Binding to update the enteredText property like this.
TextEdit { id: myTextField; text: "Please type here..." }
Binding { target: app; property: "enteredText"; value: myTextField.text }
Whenever the text in the TextEdit is updated, the C++ property will be updated also.
Can you show me please what did you plan to do, since I need contra scenarium.
Sincerely,
Marko
Qt 5.3 Opensource & Creator 3.1.2
No
Which is totally irrelevant here since you are not trying to bind a property of a C++ object to an expression.
Indeed, which is just a plain and simple property binding.
The "state" property gets bound to an expression using the context property object's "connection status" property.
Cheers,
_
You've done that numerous times already, I am sure
Qt Code:
state: ueApplicationStatus.m_ueDatabaseConnectionStatus === UeTypeDatabaseConnectionStatus.CONNECTED ? "ueStatusIndicatorDabaseConnected" : "ueStatusIndicatorDabaseNotConnected"To copy to clipboard, switch view to plain text mode
Cheers,
_
MarkoSan (18th September 2015)
Bookmarks