Dialog type of container More...
Inherits Item
This element was introduced in qt-components 4.7.
The sheet is (in most use-cases) a fullscreen dialog that slides up from the bottom when activated. Buttons are rendered on top of the content field. Sheets are used whenever the amount of information and configure options is too much for standard dialogs. The api is similar to the one used in dialogs.
Example shows how to declare a sheet that has one button. Note that the button is put into Flickable so that the content of the sheet can be panned. Sheet itself is declared outside of the Flickable that contains the another button that launches the Sheet.
... Flickable { ... Button { id: myButton text: "Launch Sheet" onClicked: sheet.open() } } Sheet { id: sheet acceptButtonText: "Save" rejectButtonText: "Cancel" content: Flickable { anchors.fill: parent anchors.leftMargin: 10 anchors.topMargin: 10 contentWidth: col2.width contentHeight: col2.height flickableDirection: Flickable.VerticalFlick Column { id: col2 anchors.top: parent.top spacing: 10 Button { text: "Click Me!" } } } onAccepted: myButton.text = "Accepted!" onRejected: myButton.text = "Rejected!" }
acceptButtonText : string |
Property default is "".
Text of the accept button. When no text is given, the button is not displayed.
buttons : Item |
The item to be placed inside the button area of the sheet. Normally the buttons are defined with the acceptButtonText and rejectButtonText properties. The buttons property can be used whenever a more customized button area is needed. Consider using the SheetButton instead of the simple Button element. This ensures that the buttons are correctly styled.
content : Item |
The Item to be placed inside the content area of the sheet.
rejectButtonText : string |
Property default is "".
Text of the reject button. When no text is given, the button is not displayed.
This property holds the current status.
visualParent : Item |
The Item in which the sheet is displayed. With the visualParent developers are able to define the part of the screen where the sheet should be anchored.
This signal is fired when the function accept() is called. Normally this signal is associated with the "Ok" or "Save" button.
This signal is fired when the function reject() is called. Normally this signal is associated with the "Cancel" or "Delete" button.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.