1

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.

barry
  • 4,037
  • 6
  • 41
  • 68

1 Answers1

0

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.

user800183
  • 188
  • 7
  • Update - BlackBerry advise to use the Dialog class rather than SystemDialog – barry Jun 02 '13 at 16:22
  • barry, they may advise that, but the two are not related classes. Dialog is a component rendered entirely in your own app, whereas SystemDialog is an interface to an external service provided by the OS, with a standardized behavior and look-and-feel. They're not interchangeable, so ignore their advice as you see fit. – Peter Hansen Nov 16 '13 at 03:27