Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using a QGraphicsView as the viewport for a (different) QGraphicsView?
Forum Updated to NodeBB v4.3 + New Features

Using a QGraphicsView as the viewport for a (different) QGraphicsView?

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 3.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    meejah
    wrote on last edited by
    #1

    Should this work?

    Perhaps there is a better solution to what I wish to do: using a QGraphicsScene, I will draw a bunch of polygons (actually a map) and wish to overlay information on top of this using a different QGraphicsScene so that the user may zoom the map without affecting the scale of the overlayed information.

    My naive approach of simply using the "map" QGraphicsView to draw the background on the "overlay" QGraphicsView (similar to how drawing a background with OpenGL functions) doesn't work. Any suggestions?

    1 Reply Last reply
    0
    • ? This user is from outside of this forum
      ? This user is from outside of this forum
      Guest
      wrote on last edited by
      #2

      have you seen the Chips demo that ships with Qt SDK ... you have a scene and multiple views using it

      1 Reply Last reply
      0
      • A Offline
        A Offline
        andre
        wrote on last edited by
        #3

        I think meejah wants to overlay items over his map, that don't scale or transform with the map itself. So, that is not about multiple views on the same scene, but about overlaying items. Did I get that right?

        Did you look into the different GraphicsItemFlags? There are flags for marking an item to ignore transformations...

        1 Reply Last reply
        0
        • M Offline
          M Offline
          meejah
          wrote on last edited by
          #4

          Thanks Andre, yes that is what I want to do.

          What I needed is exactly what QGraphicsItem::ItemIgnoresTransformations provides, namely ignoring scale.

          Cheers,
          meejah

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved