Results 1 to 12 of 12

Thread: Position of Items in QGraphicsScene/QGraphicsView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2009
    Posts
    6
    Thanks
    2

    Default Re: Position of Items in QGraphicsScene/QGraphicsView

    I used maximumViewportSize(), this worked.

    When I don't set a sceneRect, the position 0,0 is the center of the view.

    Thanks for your help.

  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: Position of Items in QGraphicsScene/QGraphicsView

    Quote Originally Posted by StefanK2 View Post
    When I don't set a sceneRect, the position 0,0 is the center of the view.
    The whole scene is centered in the view. Unless you place an item in negative coordinates of the scene, the scene's left top corner will have (0,0) coordinates.
    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.


  3. The following user says thank you to wysota for this useful post:

    StefanK2 (8th July 2009)

Similar Threads

  1. Replies: 2
    Last Post: 12th June 2009, 10:55
  2. Some menubar items can not be clicked
    By richardander in forum Qt Programming
    Replies: 4
    Last Post: 11th March 2009, 00:26
  3. Light items for the graphicsView
    By maverick_pol in forum Qt Programming
    Replies: 12
    Last Post: 1st November 2007, 18:51
  4. QGraphicsView: Dialog Position Doubt
    By arjunasd in forum Qt Programming
    Replies: 1
    Last Post: 6th August 2007, 17:48
  5. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20

Tags for this Thread

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.