Results 1 to 4 of 4

Thread: QPainter & QPrinter

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QPainter & QPrinter

    Hi,

    I have an application where I am drawing braces ( '{' & '}' ) using drawLine and drawArc functions of QPainter. On the screen everything looks good. But when I print, the positions of the lines and the arcs are not the same as they appear on the screen. I am using the same paint function for both painting on the screen and on the printer.

    Can someone please tell me, how can I fix this?

    Thanks a lot.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPainter & QPrinter

    Maybe you could use QPainterPath instead? The problem might be with resolutions or coordinate system.

  3. #3
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPainter & QPrinter

    I am extremely sorry.
    I forgot to tell that I am using Qt 3.3.6

    Thanks.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QPainter & QPrinter

    Could you show the code you have written?

Similar Threads

  1. How to use QPrinter without QPrintDialog?
    By pascal456 in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2006, 19:57
  2. QPainter and QImage
    By beerkg in forum Newbie
    Replies: 3
    Last Post: 7th September 2006, 14:48
  3. Replies: 7
    Last Post: 20th March 2006, 20:03
  4. 2 Questions about QPainter
    By SkripT in forum Qt Programming
    Replies: 12
    Last Post: 22nd February 2006, 15:08
  5. passing a QPainter object to widgets
    By vratojr in forum Qt Programming
    Replies: 9
    Last Post: 11th January 2006, 15:27

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.