Results 1 to 2 of 2

Thread: How to resize pushbutton to fit text in mac os

  1. #1
    Join Date
    Nov 2011
    Posts
    2
    Qt products
    Qt3
    Platforms
    MacOS X

    Default How to resize pushbutton to fit text in mac os

    I am trying to make a QPushbutton that will increase in size to fit the text platform independently.
    The text can be very long and I need the button to size itself so that all the text can be visible.

    For example: I have a button with text "Restore defaults" , it is visible in win 7 . When i run this in mac os , only a part of the text ("tore defaults") is displayed.
    Could anyone tell me how to solve this problem, to make all the text appear on the button.

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: How to resize pushbutton to fit text in mac os

    When you build widget with use of layout this should be done automatically out of the box.
    You may have to use size policy - set it for main window / central widget.

Similar Threads

  1. vertical pushbutton text
    By eric in forum Qt Programming
    Replies: 11
    Last Post: 18th April 2019, 19:17
  2. How to resize pushbutton to fit text?
    By Dreamerzz in forum Qt Programming
    Replies: 9
    Last Post: 16th May 2012, 13:01
  3. Replies: 0
    Last Post: 29th September 2011, 09:41
  4. Wrap Text in PUSHBUTTON
    By BalaQT in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2009, 13:54
  5. How to resize window with pushbutton
    By kaydknight in forum Newbie
    Replies: 2
    Last Post: 13th January 2007, 12:17

Tags for this Thread

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.