Results 1 to 5 of 5

Thread: QGraphicsItem subclass access to QGraphicsView size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    30
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: QGraphicsItem subclass access to QGraphicsView size

    That looks like a good idea, that way I won't have to worry about getting parent widget coordinates.

    One question though: will it be possible to "print" the whole scene (including the arrows) to an image, or will the arrow not be included because it's not part of the scene?

    Thanks!

  2. #2
    Join Date
    Sep 2009
    Posts
    30
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: QGraphicsItem subclass access to QGraphicsView size

    Note to self, must read docs:
    http://doc.trolltech.com/4.2/qgraphicsview.html#render

    It is the view that is rendered to the printer, not the scene, so drawing on the foreground it is!

    thanks again

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

    Default Re: QGraphicsItem subclass access to QGraphicsView size

    There is also QGraphicsScene::render().
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. QGraphicsView, QGraphicsItem, QGraphicsScene
    By Shuchi Agrawal in forum Newbie
    Replies: 10
    Last Post: 23rd March 2011, 20:50
  2. Replies: 5
    Last Post: 31st December 2010, 11:49
  3. Animation of QGraphicsItem in QGraphicsView
    By mirelon in forum Qt Programming
    Replies: 4
    Last Post: 19th December 2009, 15:25
  4. Multiple inheritance of QGraphicsView and QGraphicsItem
    By cookie1909 in forum Qt Programming
    Replies: 9
    Last Post: 15th May 2009, 18:02
  5. (QT4.2-RC1) QGraphicsScene QGraphicsView QGraphicsItem
    By antonio.r.tome in forum Qt Programming
    Replies: 1
    Last Post: 20th September 2006, 10:56

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.