PDA

View Full Version : [QtCreator] How to add QToolButton to mainToolBar



Si1ver
5th August 2009, 17:30
How do I add a QToolButton to the mainToolBar. I can add toolbars to the main window, and by right clicking on the toolbar I can add seperators, but how do I add QToolButtons or buttons to the main menu in QtCreator. I would prefer to do this graphically in the ui editor inside Qt.

Also is it possible to graphically create and edit the QMenuBar? I tried right clicking on it, but only says promote or remove.

I know you can do these both in code, but I want to do them graphically.

Thank you

Silver

franz
5th August 2009, 17:54
Create an action and add it to your tool bar. The QToolButton will be created automagically by the QToolBar.

Check out the action editor in Qt designer. If you use that to create a new action, you can drag the action into the tool bar.

Si1ver
5th August 2009, 18:36
Ah brilliant thank you for your help. I worked out how to do the toolbar buttons.

Does anyone know how to create and edit the main menu drop downs? Thanks

Si1ver
5th August 2009, 21:15
Nevermind, I just wasnt pressing enter :)