plasma components ContextMenu

Marco Martin notmart at gmail.com
Fri Aug 10 17:20:46 UTC 2012


On Friday 10 August 2012, Gregor Tätzner wrote:
> I need a nice context menu for kickoff qml. Is someone working on this?
> There is a ContextMenu.qml file in plasmacomponents, but it's
> kinda...empty.

because it's implemented in c++.

it will create a native qmenu, so should be fine for the use case (items 
context menu?)

ContextMenu {
      visualParent: contentMenuButton
      MenuItem {
           text: "bah"
           icon: QIcon("iconname")
           onClicked: foo()
      }
}

then has open() and close() methods

visualparent is the item to which it should appear near to.

Cheers,
Marco Martin


More information about the Plasma-devel mailing list