Skip to content

Instantly share code, notes, and snippets.

@40
Created September 30, 2012 19:20
Show Gist options
  • Select an option

  • Save 40/3808200 to your computer and use it in GitHub Desktop.

Select an option

Save 40/3808200 to your computer and use it in GitHub Desktop.
QML Menu in BB10
Menu.definition: MenuDefinition {
// Add a Help action
helpAction: HelpActionItem {
// do something there
onTriggered: {
}
}
// Add a Settings action
settingsAction: SettingsActionItem {
onTriggered: {
//do something here
//like show the settings screen
}
}
}
// Default empty project template
import bb.cascades 1.0
// creates one page with a label
Page {
Menu.definition: MenuDefinition {
// Add a Help action
helpAction: HelpActionItem {
// do something there
onTriggered: {
}
}
// Add a Settings action
settingsAction: SettingsActionItem {
onTriggered: {
//do something here
//like show the settings screen
}
}
}
Container {
layout: DockLayout {
}
Label {
text: qsTr("Hello World")
textStyle.base: SystemDefaults.TextStyles.BigText
verticalAlignment: VerticalAlignment.Center
horizontalAlignment: HorizontalAlignment.Center
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment