Results 1 to 2 of 2

Thread: WordWrapping to a Ellipse or other shape that isn't a rect

  1. #1
    Join Date
    Aug 2008
    Posts
    10
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default WordWrapping to a Ellipse or other shape that isn't a rect

    Is there a way, using Qlabel or some other Q text thing, to get text to wrap inside an ellipse shape without having to write code that deals on the letter level? QLabel has wordwrap, but I can only define a rect area, instead of an area that doesn't have 90 degree vertical sides. Anyone know how to do it?

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: WordWrapping to a Ellipse or other shape that isn't a rect

    Perhaps with QTextLayout. Check the example in detailed description. One can set width of individual lines.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    warry (16th August 2008)

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.