Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import QtQuick 1.1
- import Sailfish.Silica 1.0
- import "../config.js" as DB
- Page {
- id: page
- // To enable PullDownMenu, place our content in a SilicaFlickable
- SilicaFlickable {
- anchors.fill: parent
- // PullDownMenu and PushUpMenu must be declared in SilicaFlickable, SilicaListView or SilicaGridView
- PullDownMenu {
- MenuItem {
- text: "Save"
- onClicked: {
- DB.setNote(noteTitle.text,note.text)
- console.debug("Save note " + noteTitle.text + " with text: " + note.text)
- FirstPage.getNotes()
- }
- }
- }
- // Tell SilicaFlickable the height of its content.
- contentHeight: childrenRect.height
- Column {
- width: page.width
- spacing: theme.paddingLarge
- TextField {
- id: noteTitle
- anchors.top: parent.top
- width: parent.width - 120
- anchors.topMargin: 20
- anchors.left: parent.left
- anchors.leftMargin: 80
- placeholderText: "Title of Note"
- }
- TextArea {
- id: note
- placeholderText: "Put note in here"
- focus: true
- width: parent.width
- height: page.height - 120
- anchors.top: noteTitle.bottom
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment