I have a question about SystemDialogs? I need to implement one in QML, but the sample project (“dialogs”) available on Github appears as containing errors when built with the 10.1 SDK. They do however run normally.
The code of interest is as follows:
SystemDialog {
id: dialog
title: qsTr("DIALOG")
body: qsTr("Dialog body")
confirmButton.label: qsTr("Okay button")
confirmButton.enabled: true
cancelButton.label: qsTr("Cancel button")
cancelButton.enabled: true
buttons: [
SystemUiButton {
id: random
label: qsTr("RANDOM")
enabled: true
},
SystemUiButton {
id: random2
label: qsTr("RANDOM2")
enabled: true
}
]
…
}
The “error” properties are the label
and enabled
properties of the confirm and cancel buttons and the buttons
array property of the SystemDialog. As mentioned, although the IDE highlights them as errors, the code appears to work as expected.
My question is, is there a way to do something similar in SDK10.1? I need to set the text on the buttons in the dialog.
The names 'label' and 'enabled' are correct.
You can check bbndk-10.1/target_10_1_0_1020/qnx6/usr/include/bb/system/SystemUiButton.hpp
I think the IDE is not correct in regarding those names as an error.