PDA

View Full Version : ToolButton: huge check appears for no reason



nuliknol
3rd May 2014, 18:56
Hi,
I have successfuly created a toolbutton using this code:



ToolBar {
ToolButton {
iconSource: "/home/niko/qtdev/images/identity_menu_icon.png"
}
}

However when I add another line specifying the menu to be used with this button:



ToolBar {
ToolButton {
iconSource: "/home/niko/qtdev/images/identity_menu_icon.png"
menu: menu_identities
}
}

sudenly a huge black check mark starts to appear on top of my "identity_menu_icon.png" making the image look bad, I guess it thinks the button is a sort of check box.
So I added "checkable: false" and "checked: false" properties, being the final code this:


ToolBar {
ToolButton {
iconSource: "/home/niko/qtdev/images/identity_menu_icon.png"
checkable: false;
checked: false;
menu: menu_identities
}
}

but the check mark this appears. If I remove the "menu:" property the check mark disappears, but I need to use the menu :(
How do I make this check mark disappear ?

TIA

anda_skoa
4th May 2014, 13:44
The thing you are describing sounds like the menu indicator, i.e. a visual hint that a long press on the button will open a menu.

Usually used for things like undo/redo or back/forward in browsers.

How it looks will depend on the platform's style

Maybe you can overrule that by using a custom ButtonStyle, but usually the indicator is there for a reason.

Cheers,
_