Results 1 to 4 of 4

Thread: [QtCreator] How to add QToolButton to mainToolBar

  1. #1
    Join Date
    Jun 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default [QtCreator] How to add QToolButton to mainToolBar

    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

  2. #2
    Join Date
    Jul 2009
    Location
    Enschede, Netherlands
    Posts
    462
    Thanked 69 Times in 67 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: [QtCreator] How to add QToolButton to mainToolBar

    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.

  3. #3
    Join Date
    Jun 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: [QtCreator] How to add QToolButton to mainToolBar

    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

  4. #4
    Join Date
    Jun 2009
    Posts
    9
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: [QtCreator] How to add QToolButton to mainToolBar

    Nevermind, I just wasnt pressing enter

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.