ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #04227
Re: [qml] Popover and OptionSelector
On Tue, Sep 24, 2013 at 12:32 PM, Sam Bull <sam.hacking@xxxxxxxx> wrote:
> I'm trying to create a combobox-like widget. I have a button that calls
> PopupUtils.show() to display a popover, but have not worked out how to
> save the selection. I need to be able to save the selection and also
> change the button's label in response to a selection.
>
> The popover looks like this:
> Component {
> id: popoverComponent
> Popover {
> id: popover
>
> OptionSelector {
> model: ["BTC", "mBTC", "μBTC"]
> expanded: true
>
> onDelegateClicked: PopupUtils.close(popover)
> }
> }
> }
>
> Any tips?
>
You probably want to use the ActionSelectionPopover component:
http://developer.ubuntu.com/api/ubuntu-12.10/qml/mobile/qml-ubuntu-components-popups0-actionselectionpopover.html
.
HTH,
Olivier
References