Results 1 to 2 of 2

Thread: Need help to handle with QGraphicsScene/View

  1. #1
    Join Date
    Jan 2012
    Location
    Canary Islands, Spain
    Posts
    86
    Thanks
    4
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Need help to handle with QGraphicsScene/View

    I have a lot of images with different sizes, and i'd like to show them always centered on QGraphicsView (one at time, it's a slideshow), but the position makes crazy sometimes, usually with vertical images.
    If i set QgraphicsScene rect to QGraphicsView scene, the result is good, but there is not scrollbars, and setting scrollbars always is not an elegant solution.
    Any tip for the problem?
    Is possible to set QGraphicsScene rect size = image size, and them center the scene in the view?
    I'm not sure how to keep al the images centered in view
    Always trying to learn >.<

  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: Need help to handle with QGraphicsScene/View

    What's about QGraphicsView::setAlignment() with Qt::AlignCenter?

Similar Threads

  1. Fixed QGraphicsScene in view
    By jano_alex_es in forum Newbie
    Replies: 1
    Last Post: 10th May 2012, 01:29
  2. Replies: 5
    Last Post: 3rd April 2010, 04:07
  3. Replies: 5
    Last Post: 21st January 2010, 15:55
  4. QGLWidget inside QGraphicsScene/View
    By h123 in forum Qt Programming
    Replies: 3
    Last Post: 10th January 2009, 08:46
  5. Working with coordinates (QGraphicsScene/view)
    By maverick_pol in forum Qt Programming
    Replies: 5
    Last Post: 27th March 2008, 08:35

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.