Results 1 to 2 of 2

Thread: Button border cropped to rectangle when icon image added

  1. #1
    Join Date
    Sep 2009
    Posts
    41
    Thanks
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Button border cropped to rectangle when icon image added

    When I set the size of the icon on a button larger than 20 pixels in the height dimension, the standard rounded border disappears and turns into an ugly square box (see attached image). How do I get a normal looking button with a large icon? Thanks for your help!
    square_button_im&#97.jpg

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Button border cropped to rectangle when icon image added

    I guess your widget is not one of the allowed widget sizes on a mac:

    Quote Originally Posted by documentation
    Widget size - Mac OS X allows widgets to have specific fixed sizes. Qt does not fully implement this behavior so as to maintain cross-platform compatibility. As a result some widgets sizes may be inappropriate (and subsequently not rendered correctly by the HITheme APIs).The QWidget::sizeHint() will return the appropriate size for many managed widgets (widgets enumerated in QStyle::ContentsType).

Similar Threads

  1. Replies: 0
    Last Post: 14th January 2010, 06:48
  2. I want 'Next' button always be close to border
    By datha_k in forum Qt Programming
    Replies: 5
    Last Post: 17th December 2009, 12:00
  3. How can I added a button to QGrahpicsScene
    By learning_qt in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2009, 08:51
  4. Replies: 2
    Last Post: 5th July 2008, 19:35
  5. Display rectangle on Image
    By parmar ranjit in forum Qt Programming
    Replies: 3
    Last Post: 22nd February 2008, 13:09

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.