Results 1 to 9 of 9

Thread: How to make some items non movable on scene

Threaded View

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

    Default Re: How to make some items non movable on scene

    Has anybody come across similar problem with qgraphicsscene?
    Yes. It is difficult to implement an x-y data plot using graphics / view for the whole thing because of these scaling problems.

    My solution was to use graphics / view [I]only for the canvas[I] (the region containing the data curves). The axes, titles, etc. were ordinary QWidgets (a custom axis widget, and standard QLabel for titles). The composite widget that holds all of these sub-widgets handles the layout, zooming, resizing, etc.

    The canvas needs to send signals when zooming occurs. The composite widget is connected to these signals and sets the axis ranges appropriately.

    Search for other posts under my name and you will see detailed discussions of how to solve the problem as well as that of keeping labels on the plot the same size even when the plot is zoomed.

  2. The following user says thank you to d_stranz for this useful post:

    tarunrajsingh (3rd April 2013)

Similar Threads

  1. Replies: 0
    Last Post: 14th February 2012, 11:03
  2. Moving items in a scene via slots
    By ventura8 in forum Qt Programming
    Replies: 2
    Last Post: 30th August 2011, 15:16
  3. add items into scene
    By Noxxik in forum Qt Programming
    Replies: 0
    Last Post: 9th March 2009, 16:32
  4. Can't move Items in the scene
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 16th May 2008, 09:40
  5. Cann't move movable items on custom graphics view
    By wojtekw in forum Qt Programming
    Replies: 2
    Last Post: 3rd March 2008, 21:30

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.