Results 1 to 2 of 2

Thread: Disable QGraphicsScene autoscale

  1. #1
    Join Date
    Oct 2015
    Posts
    17
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Disable QGraphicsScene autoscale

    Hi guys.

    I have a scene where I paint a series of items using a drag-and-drop process. What I want to do is to place the item where I loose it, do not auto-scale it. What happens to me is that if for example, having the scene empty, I drag an item and release it very close to the right side of the scene, it puts me in the middle and that's not what I want. What I want is to put it where I let it go and if the item does not enter the horizontal axis the horizontal scroll appears so that the user can see it.

    Thank you.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Disable QGraphicsScene autoscale

    The scaling you are seeing is a feature of the QGraphicsView, not the scene (unless you are applying a transformation to the scene). Be sure you are not calling some view method that affects the viewport or other property that would affect which part of the scene is displayed in the view.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 11
    Last Post: 20th August 2015, 10:48
  2. QwtPlotMarker not recognized by autoscale
    By HappyCoder in forum Qwt
    Replies: 6
    Last Post: 20th July 2015, 09:43
  3. Replies: 5
    Last Post: 4th July 2013, 08:24
  4. How to disable the automatic selectioning in a QGraphicsscene?
    By maikelmeyers in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2011, 07:11
  5. Disabling autoscale is not wirking
    By P@u1 in forum Qwt
    Replies: 2
    Last Post: 27th July 2011, 10:25

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