PDA

View Full Version : How could I create an action like the image shown by QtDesigner?



stereoMatching
6th February 2014, 02:15
As the graph show(surrounded by a red circle), I want to nested some actions into the icons and tell
the users this message by an arrow(how should I call this kind of UI?).
http://farm3.staticflickr.com/2865/12333867373_46d9f7d396.jpg

ChrisW67
6th February 2014, 04:20
QToolButton and call QToolButton::addAction() multiple times (or addActions()) with the popup menu actions. Call setDefaultAction() if you want a single click to do something. Also look at the popupMode().

stereoMatching
6th February 2014, 05:01
Sorry, my title did not express my intention correctly.

What I want to ask is, how could I design this kind of UI by QtDesigner(without hand coding)?

ps : I know how to do it by codes

ChrisW67
6th February 2014, 06:36
You cannot AFAICT. You can place the default action (QToolButton) on the tool bar, set its properties, and create the other actions in Designer. Adding the other actions to the tool button needs to be done in code.