[ create a new paste ] login | about

Link: http://codepad.org/gwwIWojD    [ raw code | output | fork ]

Python, pasted on May 15:
Column {
            id: column
            width: parent.width
            property Item contextMenu

            Row
            {
                anchors.horizontalCenter: parent.horizontalCenter
                spacing: 20

                Image {
                    id: selectedImage
                    height: 80
                    width: 80

                    visible: source != ""
                }

                IconButton {
                    icon.source: "image://Theme/icon-m-clear"
                    visible: selectedImage.source != ""
                    onClicked: selectedImage.source = ""
                }
            }

            Button {
                id: addImageButton
                //% "Add image"
                text: qsTrId("venue-checkin-add-image")
                anchors.horizontalCenter: parent.horizontalCenter
                onClicked: {
                    if (column.contextMenu === null) {
                        column.contextMenu = contextMenuComponent.createObject(column)
                    }
                    column.contextMenu.show(addImageButton)
                }
            }

            Component {
                id: contextMenuComponent
                ContextMenu {
                    MenuItem {
                        //% to checkin
                        text: qsTrId ("venue-checkin-add-image-to-checkin")
                    }
                    MenuItem {
                        //% to venue
                        text: qsTrId ("venue-checkin-add-image-to-venue")
                    }
                }
            }

            TextSwitch {
                id: facebook_switch
                //% "Share to Facebook"
                text: qsTrId("venue-checkin-share-to-facebook-button")
            }


Output:
1
2
3
4
  Line 1
    Column {
           ^
SyntaxError: invalid syntax


Create a new paste based on this one


Comments: