Results 1 to 3 of 3

Thread: QPushButton's text cut off on other computers

  1. #1
    Join Date
    Apr 2007
    Location
    Rakovnik, Czech Republic
    Posts
    175
    Thanks
    43
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QPushButton's text cut off on other computers

    I'm using the default font for the text on many QPushButtons in my project. I've sized the buttons so the text fits the way I like it.

    When I view the application on my test/deploy computer, the text looks the same as on my development computer. I've recently discovered, however, that on some computers--with various graphics cards/display resolution settings--the text is often cut off in the horizontal direction, and sometimes vertical. Is there a way to fix this, besides generically increasing the button sizes and/or decreasing the text size?

  2. #2
    Join Date
    Mar 2007
    Location
    Germany
    Posts
    229
    Thanks
    2
    Thanked 29 Times in 28 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QPushButton's text cut off on other computers

    Does a "prefered" sizePolicy in horizontal direction, instead of "fixed" help?
    "Minimum" could also help.

  3. #3
    Join Date
    Dec 2006
    Posts
    849
    Thanks
    6
    Thanked 163 Times in 151 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QPushButton's text cut off on other computers

    and in case you are not using layouts sofar: start using layouts (and as has been suggested: stop using fixed sizes).
    You can never rely on a font being available on all platforms, or (if available) being rendered pixel-true on all machines. Different resolutions etc are another reason. Maybe some people have worse eyesight and will want to increase font sizes...

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 10:49
  2. Problem pasting text into a QTextEdit
    By Spockmeat in forum Qt Programming
    Replies: 8
    Last Post: 14th March 2009, 15:36
  3. Match the text beetween two string
    By dreamer in forum Qt Programming
    Replies: 4
    Last Post: 20th May 2008, 15:48
  4. QTextEdit slow to insert text
    By thomaspu in forum Qt Programming
    Replies: 4
    Last Post: 10th January 2008, 13:05
  5. Editable text in QGraphicsView
    By wysota in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2007, 16:30

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.