FirstPage.qml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import QtQuick 2.0
  2. import Sailfish.Silica 1.0
  3. Page {
  4. id: page
  5. // The effective value will be restricted by ApplicationWindow.allowedOrientations
  6. allowedOrientations: Orientation.All
  7. // To enable PullDownMenu, place our content in a SilicaFlickable
  8. SilicaFlickable {
  9. anchors.fill: parent
  10. // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
  11. PullDownMenu {
  12. MenuItem {
  13. text: qsTr("Show Page 2")
  14. onClicked: pageStack.push(Qt.resolvedUrl("SecondPage.qml"))
  15. }
  16. }
  17. // Tell SilicaFlickable the height of its content.
  18. contentHeight: column.height
  19. // Place our content in a Column. The PageHeader is always placed at the top
  20. // of the page, followed by our content.
  21. Column {
  22. id: column
  23. width: page.width
  24. spacing: Theme.paddingLarge
  25. PageHeader {
  26. title: qsTr("UI Template")
  27. }
  28. Label {
  29. x: Theme.horizontalPageMargin
  30. text: qsTr("Hello Sailors")
  31. color: Theme.secondaryHighlightColor
  32. font.pixelSize: Theme.fontSizeExtraLarge
  33. }
  34. }
  35. }
  36. }