ErrorDialog.qml Example File
invocation/invokeclient/assets/ErrorDialog.qml
import bb.cascades 1.0
import bb.cascades 1.0
Dialog {
id: root
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
layout: DockLayout {}
ImageView {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Fill
imageSource: "asset:///images/background.png"
}
Container {
horizontalAlignment: HorizontalAlignment.Fill
verticalAlignment: VerticalAlignment.Center
Label {
horizontalAlignment: HorizontalAlignment.Center
text: qsTr ("An Error Occurred")
textStyle {
base: SystemDefaults.TextStyles.BigText
}
}
Label {
horizontalAlignment: HorizontalAlignment.Center
topMargin: 100
text: _app.errorMessage
multiline: true
}
Button {
horizontalAlignment: HorizontalAlignment.Center
topMargin: 100
text: qsTr ("OK")
onClicked: {
_app.clearError()
root.close()
}
}
}
}
function handleErrorMessage()
{
if (_app.errorMessage != "")
root.open()
}
onCreationCompleted: _app.errorMessageChanged.connect(handleErrorMessage)
}