Results 1 to 5 of 5

Thread: QGraphicsView Current Center

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Posts
    16
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: QGraphicsView Current Center

    In order to find the center of the view in scene coordinates, I had to do it in the following order:
    mapToScene(viewport()->rect()).boundingRect().center()
    mapToScene(viewport()->rect().center() produces incorrect results and for me were a little to the upper left.

    Can anyone help me understand why they are different?

  2. The following user says thank you to stretchtiberius for this useful post:

    veiovis (18th April 2016)

Similar Threads

  1. Distributing QT application for Mac OS
    By mb0 in forum Qt Programming
    Replies: 1
    Last Post: 31st May 2007, 18:59
  2. Replies: 15
    Last Post: 21st April 2007, 17:46

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.