Ubuntu.Components.Popups.popupUtils

Popover utility functions. More...

Import Statement: import Ubuntu.Components.Popups 1.3

Methods

  • close(popupObject)
  • open(popup, caller, params)

Detailed Description

Method Documentation

close(popupObject)

Closes (hides and destroys) the given popup.

import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.3
Button {
onClicked: PopupUtils.close(popup)
}

open(popup, caller, params)

The function creates and shows a popup object from either a Component or URL of a QML document. The caller drives the placement of the popup as well as the pointer's. The third parameter (param) can hold a series of properties configuring the popup to be opened. This can be any property defined by the popups and additional custom ones defined in derived popups.

caller should be given when a SheetBase or Dialog is specified using a URL and opened inside a Window. If not, the application's root item will be the dismiss area.

Returns a popop object, which can be closed using close.

import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.3
Button {
onClicked: PopupUtils.open(popoverComponent, popoverButton, { 'dummy': true } )
}

See Popover, SheetBase and Dialog for their respective documentation and more examples.