Results 1 to 7 of 7

Thread: QLabel Word Wrapping adds unnecessary line breaks

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QLabel Word Wrapping adds unnecessary line breaks

    Quote Originally Posted by forgottenduck View Post
    Do you have any idea if there is some method I could reimplement in my QLabel subclass to control this behavior?
    sizeHint(), I guess.

    I suppose I could just set my own line breaks based on the length of the string, which I assume is what QLabel does anyway,
    No, it doesn't You can use QTextLayout if you want to layout the text yourself.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. The following user says thank you to wysota for this useful post:

    forgottenduck (2nd April 2015)

Similar Threads

  1. QTextTable and word wrapping
    By ssample in forum Qt Programming
    Replies: 0
    Last Post: 21st May 2013, 09:38
  2. qtexttable - word wrapping
    By ssample in forum General Programming
    Replies: 0
    Last Post: 19th May 2013, 08:55
  3. Word wrapping in a QTableWidget cell
    By jcooperddtd in forum Qt Programming
    Replies: 3
    Last Post: 1st May 2007, 03:57
  4. Word wrapping
    By bruccutler in forum Qt Programming
    Replies: 4
    Last Post: 26th February 2007, 16:33
  5. word wrapping in QTable Cell
    By joseph in forum General Discussion
    Replies: 0
    Last Post: 27th November 2006, 09:30

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
  •  
Qt is a trademark of The Qt Company.