Results 1 to 6 of 6

Thread: Shrink Text

  1. #1
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Shrink Text

    how to Shrink Text to fit Qlabel?

  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: Shrink Text

    Please define: "shrink text"

    Is this:
    1. Adjust the font size?
    2. Clip the text?
    3. Adjust the text?
    4 ...

  3. #3
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Shrink Text

    Quote Originally Posted by tbscope View Post
    Please define: "shrink text"

    Is this:
    1. Adjust the font size?
    2. Clip the text?
    3. Adjust the text?
    4 ...
    auto Adjust the font size whit Qlabel size

  4. #4
    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: Shrink Text

    QLabel::setScaledContents(bool)?

  5. #5
    Join Date
    Oct 2010
    Location
    Iran
    Posts
    27
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Shrink Text

    or
    3. Adjust the text?

  6. #6
    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: Shrink Text

    If you want to adjust the text, look into the fontmetrics.
    http://doc.qt.nokia.com/4.7/qfontmet...tml#elidedText

Similar Threads

  1. QListWidget shrink to fit size of items
    By woodtluk in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2010, 21:42
  2. Resizing a QLabel with a pimap. Won't shrink!
    By dh7892 in forum Qt Programming
    Replies: 2
    Last Post: 17th September 2010, 17:30
  3. Replies: 0
    Last Post: 2nd August 2010, 09:37
  4. Replies: 1
    Last Post: 3rd September 2008, 14:16
  5. Shrink QMainWindow to Minimum Size
    By kloffy in forum Qt Programming
    Replies: 4
    Last Post: 17th February 2008, 17:54

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.