Results 1 to 5 of 5

Thread: Add exclusive buttons in a toolbar with qtdesigner

  1. #1
    Join Date
    Nov 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Add exclusive buttons in a toolbar with qtdesigner

    I was able with qt3 to add exclusive buttons in a toolbar with designer by using QActionGroup, but I can't find how do this with qt4, did I Miss Something?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add exclusive buttons in a toolbar with qtdesigner

    I'm afraid you will have to do it in the code.

  3. #3
    Join Date
    Nov 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add exclusive buttons in a toolbar with qtdesigner

    It's not a good news
    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add exclusive buttons in a toolbar with qtdesigner

    Oh, come on, it's not that bad:
    Qt Code:
    1. QActionGroup * group = new QActionGroup( this );
    2. group->addAction( ui.action1 );
    3. group->addAction( ui.action2 );
    4. group->addAction( ui.action3 );
    5. ...
    6. _ui.action1->setChecked( true );
    To copy to clipboard, switch view to plain text mode 
    But I guess that the Trolls could improve Action Editor to include action grouping.
    Last edited by jacek; 19th November 2006 at 20:47. Reason: missing *

  5. #5
    Join Date
    Nov 2006
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Add exclusive buttons in a toolbar with qtdesigner

    Oh, yes I can do it directly in the code, but I think it's cleaner to do it in the designer. Waiting for the trolls ...

    Thanks

Similar Threads

  1. animating a toolbar??!?
    By nupul in forum Qt Programming
    Replies: 4
    Last Post: 1st April 2006, 08:27

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.