Results 1 to 13 of 13

Thread: Zooming scene

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Posts
    279
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    6
    Thanked 40 Times in 39 Posts

    Default Re: Zooming scene

    I might be missing something here, but isn't it as simple as calling
    Qt Code:
    1. fitInView(selection, Qt::KeepAspectRatio);
    To copy to clipboard, switch view to plain text mode 
    selection being the rectangle in scene coords.

  2. #2
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Zooming scene

    Quote Originally Posted by spud View Post
    I might be missing something here, but isn't it as simple as calling
    Qt Code:
    1. fitInView(selection, Qt::KeepAspectRatio);
    To copy to clipboard, switch view to plain text mode 
    selection being the rectangle in scene coords.
    Yes, but this only if you implement the magnifying glass as a separate view for the scene.

    Regards

  3. #3
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    37
    Thanked 53 Times in 40 Posts

    Default Re: Zooming scene

    Quote Originally Posted by spud View Post
    I might be missing something here, but isn't it as simple as calling
    Qt Code:
    1. fitInView(selection, Qt::KeepAspectRatio);
    To copy to clipboard, switch view to plain text mode 
    selection being the rectangle in scene coords.
    Yes you are right. I missed this simple thing
    In that case i guess my idea will work.
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  4. #4
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Zooming scene

    In that case i guess my idea will work.
    Take a look at post #2.

    Regards

  5. #5
    Join Date
    Aug 2006
    Location
    Bangalore,India
    Posts
    419
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    37
    Thanked 53 Times in 40 Posts

    Default Re: Zooming scene

    Quote Originally Posted by marcel View Post
    Take a look at post #2.

    Regards
    Right. Guess it should be "our" idea or rather our independent ideas. Sorry , i failed to read yours while "skimming" This was unintentional
    The biggest difference between time and space is that you can't reuse time.
    -- Merrick Furst

  6. #6
    Join Date
    Feb 2006
    Location
    Romania
    Posts
    2,744
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 541 Times in 521 Posts

    Default Re: Zooming scene


    No problem. I know you didn't see it.
    Anyway, at first I didn't think it would work either.


    Regards

Similar Threads

  1. QGraphicsView, QGraphicsItem, QGraphicsScene
    By Shuchi Agrawal in forum Newbie
    Replies: 10
    Last Post: 23rd March 2011, 21:50
  2. can I get another QGraphicsView's scene?
    By sincnarf in forum Qt Programming
    Replies: 1
    Last Post: 28th June 2007, 22:41
  3. Deleting a scene from QGraphicsItem mouseEvent
    By JonathanForQT4 in forum Qt Programming
    Replies: 5
    Last Post: 10th April 2007, 12:27
  4. Replies: 3
    Last Post: 11th March 2007, 14:04
  5. How to use QGraphicsView and Scene right ...
    By Mike in forum Qt Programming
    Replies: 6
    Last Post: 22nd January 2007, 09:51

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.