Results 1 to 6 of 6

Thread: Squeeze text in QLabel

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2007
    Posts
    244
    Thanks
    42
    Thanked 8 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Squeeze text in QLabel

    Hi,
    I have a dialog with a fixed width and a QLabel in it which will display text from a database; but the lines of text that will be displayed are some smaller and some larger of the gui. I don't want enable multiline in qlabel. Is it possible squeezing ( = scale horizontally) the text and fit so the gui width? I have attached an example of what i mean (i made it with qpainter and scale() ): the first row is exceeding the dialog width while the second one is the same line (with same font size) but squeezed.

    Thanks
    Attached Images Attached Images
    Giuseppe CalÃ

Similar Threads

  1. Unhandled exception in qatomic
    By NewGuy in forum Qt Programming
    Replies: 14
    Last Post: 23rd July 2013, 09:49
  2. Editable text in QGraphicsView
    By wysota in forum Qt Programming
    Replies: 8
    Last Post: 24th February 2007, 15:30
  3. QLabel, large, rich text, font size
    By TheKedge in forum Qt Programming
    Replies: 3
    Last Post: 5th February 2007, 11:56
  4. Qlabel with (icon and text) HowTo ?
    By QiT in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2006, 08:14
  5. Setting text color on QLabel
    By Yorma in forum Newbie
    Replies: 11
    Last Post: 15th June 2006, 07:25

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.