Results 1 to 2 of 2

Thread: centre alignment of text in the pdf report

  1. #1
    Join Date
    Jul 2014
    Posts
    12
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default centre alignment of text in the pdf report

    hi,
    iam trying to make a pdf report using Qpainter. I want a part of my text in the document to be centre aligned. Is there a way to do it? plz help me with this.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: centre alignment of text in the pdf report

    There are several drawText() overloads in QPainter's API, some of them take a rectangle and flags. These flags can be used to specify alignment within the given rectangle.

    Cheers,
    _

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

    vinaysagar (25th July 2014)

Similar Threads

  1. Replies: 1
    Last Post: 11th March 2014, 12:20
  2. Printing to a plain text (txt) file from a report
    By luizofoca in forum Qt Programming
    Replies: 0
    Last Post: 10th June 2010, 20:02
  3. Replies: 1
    Last Post: 10th February 2009, 07:21
  4. Text Alignment in a ListWidget
    By Krish_ng in forum Qt Programming
    Replies: 2
    Last Post: 21st July 2007, 03:19
  5. Icon Text Alignment
    By nupul in forum Newbie
    Replies: 3
    Last Post: 1st May 2006, 05:47

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.