A popover should close automatically after selecting an option. This is not working currently. See this example and notice the popover stays on the screen even after you select an option.
----------- import QtQuick 2.0 import Ubuntu.Components 0.1 import Ubuntu.Components.Popups 0.1 import Ubuntu.Components.ListItems 0.1 as ListItems
MainView { width: units.gu(48) height: units.gu(60)
Button { objectName: "open_popover" text: "Open Popover" onClicked: testActionsPopover.show(); }
Label { id: "label" objectName: "clicked_label" anchors.centerIn: parent text: "Action not selected." }
ActionSelectionPopover { objectName: "test_actions_popover" id: testActionsPopover delegate: ListItems.Standard { text: action.text objectName: action.objectName } actions: ActionList { Action { objectName: "action_one" text: "Action one" onTriggered: label.text = "Action one selected." } Action { objectName: "action_two" text: "Action two" onTriggered: label.text = "Action two selected." }
} } }
A popover should close automatically after selecting an option. This is not working currently. See this example and notice the popover stays on the screen even after you select an option.
----------- Components. Popups 0.1 Components. ListItems 0.1 as ListItems
import QtQuick 2.0
import Ubuntu.Components 0.1
import Ubuntu.
import Ubuntu.
MainView {
width: units.gu(48)
height: units.gu(60)
Button { ver.show( );
objectName: "open_popover"
text: "Open Popover"
onClicked: testActionsPopo
}
Label {
anchors. centerIn: parent
id: "label"
objectName: "clicked_label"
text: "Action not selected."
}
ActionSelec tionPopover { popover"
objectName: action.objectName
objectName: "action_one"
text: "Action one"
onTriggered: label.text = "Action one selected."
objectName: "action_two"
text: "Action two"
onTriggered: label.text = "Action two selected."
objectName: "test_actions_
id: testActionsPopover
delegate: ListItems.Standard {
text: action.text
}
actions: ActionList {
Action {
}
Action {
}
}
}
}