Results 1 to 2 of 2

Thread: QPainter in QGraphicsScene

  1. #1
    Join Date
    Jan 2011
    Posts
    24
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QPainter in QGraphicsScene

    Hello,

    Every graphics item, in paint() , uses QPainter object to perform painting.Why i cant use individual QPainter object to paint a graphicsitem . Where does the item get the instance of the painter?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: QPainter in QGraphicsScene

    Since the items doesn't inherit QWidget (or QPaintDevice) you can't use an individual painter. You haven't anything to paint on. And why do you need one, the provided is just fine. isn't it?

Similar Threads

  1. QPainter in QGraphicsScene
    By mukunda in forum Qt Programming
    Replies: 1
    Last Post: 24th January 2011, 16:28
  2. QGraphicsScene vs QPainter techniques
    By zotu in forum Newbie
    Replies: 3
    Last Post: 23rd October 2010, 09:55
  3. QPainter(&QPrinter) & QPainter(&QImage) communication
    By gufeatza in forum Qt Programming
    Replies: 2
    Last Post: 2nd February 2010, 07:25
  4. QPainter error saving an image from a QGraphicsScene
    By cydside in forum Qt Programming
    Replies: 3
    Last Post: 29th January 2010, 04:53
  5. Replies: 3
    Last Post: 30th April 2006, 19:22

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.