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. Multiple GrapchicsViews or one GraphicsView with widget proxies
Forum Updated to NodeBB v4.3 + New Features

Multiple GrapchicsViews or one GraphicsView with widget proxies

Scheduled Pinned Locked Moved General and Desktop
5 Posts 3 Posters 5.1k 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
    mario
    wrote on last edited by
    #1

    In my app I want to have both graphics items and widgets, but the layout of the items and widget requires me to either have everything in one graphics view and use proxies for the widgets or use multiple graphics views.

    What would be more lightweight, use two or three QGraphicsViews (with maximum a hand-full of items) and the rest of the UI with Widgets, or use one QGraphicsView with graphics items and widget proxies.

    Typical widgets will be LIst/Treeviews, stack widget and tab bar.

    Typical graphics items will be clickable images with effects

    1 Reply Last reply
    0
    • F Offline
      F Offline
      Felix
      wrote on last edited by
      #2

      since a QGraphicsscene (which handles all the item stuff etc) can have several QGraphicViews I would choose to have several Views. The data is only stored once in the scene which is the same for all views. The Scene will then display the same data in every view (if they have the same scale/scenerect etc)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mario
        wrote on last edited by
        #3

        Ok, so what you're saying is that I could use one graphics scene with all graphics items added and then have multiple graphics views showing different part of the scene and mix the views with traditional widget by using layouts (QWidget-based layouts), right?

        Sound good.

        1 Reply Last reply
        0
        • D Offline
          D Offline
          DenisKormalev
          wrote on last edited by
          #4

          I think better to use one GraphicsView. Maybe it will be slightly more expensive, but it will give a lot of flexibility in feature.

          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
            #5

            also do refer to the chips demo src that ships with Qt, a very neat example

            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