Results 1 to 4 of 4

Thread: QGraphicsscene and QGraphicsview

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2015
    Posts
    21
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    10

    Default Re: QGraphicsscene and QGraphicsview

    Hey thanks for this fast answer!
    the size of my QGraphicsview get changed if you change the window size. How can i deal with this?
    And if I use your settings you can still move an item through the border. Is there an easy way to fix this?
    Greets

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,348
    Qt products
    Qt5
    Platforms
    Windows
    Thanks
    318
    Thanked 872 Times in 859 Posts

    Default Re: QGraphicsscene and QGraphicsview

    You will probably have to implement a handler for QGraphicsItem::itemChange(). The example code at the doc link does almost exactly what you need in the case where the item is about to move across a forbidden boundary. Also look at the Qt "elasticnodes" example.

Similar Threads

  1. Replies: 1
    Last Post: 8th September 2012, 06:08
  2. Help with QGraphicsScene
    By justin123 in forum Newbie
    Replies: 2
    Last Post: 3rd June 2010, 01:48
  3. Too Much RAM used by QGraphicsScene
    By grabalon in forum Qt Programming
    Replies: 4
    Last Post: 6th May 2010, 16:38
  4. in QGraphicsScene matrix of other QGraphicsScene
    By Noxxik in forum Qt Programming
    Replies: 5
    Last Post: 15th February 2009, 18:27
  5. Help on QGraphicsScene
    By Sandip in forum Qt Programming
    Replies: 1
    Last Post: 11th April 2008, 15: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.