Results 1 to 2 of 2

Thread: Panning QGraphicsScene

  1. #1
    Join Date
    Sep 2009
    Posts
    49
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Panning QGraphicsScene

    Hi,
    How do you implement panning of QGraphicsScene by middle mouse dragging? It's like moving the camera in OpenGL. I would prefer to use mouse based panning instead of scrollbars.

    Cheers

    Prashant

  2. #2
    Join Date
    Sep 2009
    Posts
    140
    Thanks
    4
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Panning QGraphicsScene

    Hi
    You can use QGraphicsView::centerOn or QGraphicsView::fitInView in the view linked to your scene

Similar Threads

  1. Replies: 12
    Last Post: 7th September 2011, 16:37
  2. Replies: 0
    Last Post: 5th March 2009, 06:54
  3. QPixmap display on QGraphicsScene
    By febil in forum Qt Programming
    Replies: 2
    Last Post: 26th February 2009, 09:27
  4. in QGraphicsScene matrix of other QGraphicsScene
    By Noxxik in forum Qt Programming
    Replies: 5
    Last Post: 15th February 2009, 17:27
  5. When to use QGraphicsScene or QWidget
    By fossill in forum Qt Programming
    Replies: 2
    Last Post: 9th February 2007, 23:58

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.