Results 1 to 16 of 16

Thread: No QGraphicsScene proper coordinates

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    62
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: No QGraphicsScene proper coordinates

    And how can I tell the view to "stretch" the scene object to the view's viewport?
    for example if I assign a scenerect of 100x100 with the top letf corner as (0,0) to the scene and then draw a line from 0,0 to 100,100, I'd like the view to show the diagonal of the screen (so the scene is shown entirely into the view and is "stretched" into the view")...

    Thanks

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

    Default Re: No QGraphicsScene proper coordinates

    Quote Originally Posted by harmodrew View Post
    And how can I tell the view to "stretch" the scene object to the view's viewport?
    I suggest you look at the available API of QGraphicsView.
    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, QGraphicsScene item coordinates in scene
    By harakiri in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2010, 10:02
  2. Using custom coordinates with QGraphicsScene
    By rec in forum Qt Programming
    Replies: 1
    Last Post: 7th June 2010, 08:44
  3. Replies: 7
    Last Post: 21st March 2010, 03:11
  4. Working with coordinates (QGraphicsScene/view)
    By maverick_pol in forum Qt Programming
    Replies: 5
    Last Post: 27th March 2008, 08:35
  5. Retrieving mouseover coordinates of QGraphicsScene
    By forrestfsu in forum Qt Programming
    Replies: 2
    Last Post: 23rd October 2006, 18:36

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.