[Solved]Could QtQuick control design a toolButton with embedded menu?
-
Like the graph show(the toolButton with arrow)
!http://www.qtcentre.org/attachment.php?attachmentid=9182&d=1372070834(img)!
any ideas? -
Not directly by using ToolButton. We have added a "menu" property in Button for convenience but alas, this is not currently exposed to ToolButton. I think will fix that in 5.2
For the time being, you should be able to work around it like this:
@
ToolButton {
id: menuButton
iconSource: "images/document-open.png"
width: 60 // Make some room for the arrowMenu { id: toolMenu MenuItem { text: "Some item"} } Image { anchors.right: parent.right anchors.rightMargin: 4 anchors.verticalCenter: parent.verticalCenter source: "arrow.png" } onClicked: toolMenu.popup() }
@
-
Thanks for your help, I would try to implement the arrow by Image or Canvas :)