Sailfish Webview
API DocumentationSelectorPopupInterface QML Type
A component which defines the interface for the item selector popup More...
| Import Statement: | import Sailfish.WebView.Popups 1.0 |
| Inherits: |
Properties
- selectedIndex : int
- text : string
- title : string
- values : var
Detailed Description
The SelectorPopupInterface QML type is exposed through the Sailfish.WebView.Popups QML import namespace.
The item selector presents a dialog containing a description and a list of items that can be selected by the user.
Clients who use a WebView in their application may wish to customize the appearance or behavior of the item selector popup in their application.
To do so, their implementation must extend the SelectorPopupInterface, which itself extends the UserPromptInterface, and then they must tell the WebView to use their implementation via the popupComponents property.
The key assigned to acceptText will always be "OK" while cancelText will always be assigned the empty string.
See also UserPromptInterface and custompopups.
Property Documentation
The index of the item selected by the user
A custom implementation should bind this property to the currentIndex property of their selector ComboBox (or to the appropriate property of whatever selector element is being used by the custom implementation to allow the user to select one of the values).
It is an output property, whose value is read by the web view.
The text to display as the alert message
A custom implementation should bind their selector text label to the value of this property (for example bind it to ComboBox.label if the values are being presented in the form of a ComboBox).
The text to display in the dialog header
A custom implementation should bind the title property of their DialogHeader to the value of this property.
An array of string values for the user to select from
These items should be presented to the user, for example if the values are being presented in the form of a ComboBox then ComboBox.model can be bound to this value.