Results 1 to 3 of 3

Thread: Text drawing with QPainter

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: Text drawing with QPainter

    You can use a QTextDocument

    Or, did you know you can just add QLabels too?

  2. #2

    Default Re: Text drawing with QPainter

    Quote Originally Posted by tbscope View Post
    You can use a QTextDocument

    Or, did you know you can just add QLabels too?
    Hi tbscore, thanks for the reply.

    As I said in my first post, I'm able to do almost what I want with QTextDocument, but the problem is with the vertical align. I don't want to manually add line feeds before the text so it is displayed at the vertical center of the box for example. I would like the box to be considered a big area instead of lines.

    Is there a way to speficy the height of a QTextDocument line so the vertical alignment setting would actually work?

    I'll look into QLabels too, thanks for the tip!

Similar Threads

  1. Drawing a QPixmap transparently with QPainter
    By ComServant in forum Newbie
    Replies: 2
    Last Post: 11th October 2010, 23:10
  2. QPainter and complex drawing : advices
    By toutarrive in forum Qt Programming
    Replies: 0
    Last Post: 18th November 2009, 10:51
  3. drawing Text
    By A.H.M. Mahfuzur Rahman in forum Qt Programming
    Replies: 11
    Last Post: 15th June 2009, 09:57
  4. Drawing Rich Formatted Text with QPainter
    By millsks in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2009, 19:59
  5. Replies: 4
    Last Post: 14th April 2008, 16:39

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.