Results 1 to 10 of 10

Thread: One QGraphicsScene in two QGraphicsViews

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default One QGraphicsScene in two QGraphicsViews

    Is it possible to have one scene in two views with two different sizes?

  2. #2
    Join Date
    Aug 2009
    Posts
    52
    Thanked 10 Times in 10 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: One QGraphicsScene in two QGraphicsViews

    Of course.

  3. #3
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: One QGraphicsScene in two QGraphicsViews

    I forgot to tell that the same scene should be scaled to fit the view

  4. #4
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: One QGraphicsScene in two QGraphicsViews

    That doesn't change anything.

  5. #5
    Join Date
    Mar 2009
    Posts
    9
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: One QGraphicsScene in two QGraphicsViews

    So how do i do that?

  6. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: One QGraphicsScene in two QGraphicsViews

    You set the same scene on both views and call fitInView (or apply whatever else transformation you want) on each of them.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  7. The following user says thank you to wysota for this useful post:

    klaviaturist (29th March 2011)

Similar Threads

  1. Replies: 3
    Last Post: 2nd August 2010, 10:12
  2. Scrolling 2 QGraphicsViews with 1 scrollbar
    By dentist in forum Newbie
    Replies: 2
    Last Post: 14th April 2010, 02:12
  3. Multiple QGraphicsViews with one QGraphicsScene
    By alisami in forum Qt Programming
    Replies: 3
    Last Post: 22nd March 2010, 03:02
  4. in QGraphicsScene matrix of other QGraphicsScene
    By Noxxik in forum Qt Programming
    Replies: 5
    Last Post: 15th February 2009, 17:27
  5. Replies: 3
    Last Post: 2nd February 2009, 23:40

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.