Results 1 to 5 of 5

Thread: Various icon sizes for QToolButtons on QToolbar

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Nov 2006
    Posts
    29
    Thanks
    3
    Thanked 3 Times in 3 Posts

    Default Re: Various icon sizes for QToolButtons on QToolbar

    Yes, but if I enter (100, 50) as the iconSize, all the QToolButtons on that tool bar would be of size 100x50 - even those with icons of 50x50. The icons on 50x50 would just be centered on the buttons.

    What I want (if possible), is that one button is 100x50 displaying an icon of size 100x50, and the other buttons beeing 50x50 (not 100x50 too), displaying icons of size 50x50.

    That was what I wondered would be possible.

    Thanks anyway

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Various icon sizes for QToolButtons on QToolbar

    Try with QToolbar::addWidget. As parameter pass a QToolbutton with the desired icon set.
    If this will not work, try using setFixedSize( pixmapSize ) on the added QToolbutton.

    Regards

  3. The following user says thank you to marcel for this useful post:

    Erlendhg (30th June 2007)

  4. #3
    Join Date
    Nov 2006
    Posts
    29
    Thanks
    3
    Thanked 3 Times in 3 Posts

    Default Re: Various icon sizes for QToolButtons on QToolbar

    Yup!
    setFixedSize() seems to be the thing.
    Thanks a lot

Similar Threads

  1. QToolBar icon size
    By ^NyAw^ in forum Qt Programming
    Replies: 3
    Last Post: 29th March 2007, 13:12
  2. toolbar icon sizes...
    By soul_rebel in forum KDE Forum
    Replies: 2
    Last Post: 20th March 2006, 19:21

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
  •  
Qt is a trademark of The Qt Company.