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. can we add multiple QGraphicscene to QGraphicsView?
QtWS25 Last Chance

can we add multiple QGraphicscene to QGraphicsView?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5
8 Posts 4 Posters 712 Views
  • 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.
  • S Offline
    S Offline
    Selvajothi
    wrote on 11 May 2021, 06:21 last edited by
    #1

    I have created a GUI application in which I have to add multiple scene having many QGraphicsItems in it.
    Is there any possibility to add multiple QGraphicscene to QGraphicsview? or
    If we add multiple QGraphicsview to Horizontal Layout it shows some gap inbetween each QGraphicsView.

    R 1 Reply Last reply 11 May 2021, 08:43
    0
    • S Selvajothi
      11 May 2021, 06:21

      I have created a GUI application in which I have to add multiple scene having many QGraphicsItems in it.
      Is there any possibility to add multiple QGraphicscene to QGraphicsview? or
      If we add multiple QGraphicsview to Horizontal Layout it shows some gap inbetween each QGraphicsView.

      R Offline
      R Offline
      raven-worx
      Moderators
      wrote on 11 May 2021, 08:43 last edited by
      #2

      @Selvajothi
      no its not directly possible. unless you duplicate all items from the scene into the other (which might not always be possible).

      If we add multiple QGraphicsview to Horizontal Layout it shows some gap inbetween each QGraphicsView.

      remove the gap in the layout. using its margin/spacing/etc. properties

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      1
      • S Offline
        S Offline
        Selvajothi
        wrote on 11 May 2021, 08:49 last edited by
        #3

        can we scale/resize both the view and the Graphicsitem ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 11 May 2021, 08:52 last edited by
          #4

          Hi,

          Why multiple scene under a view ? It's usually the other way around, you have multiple views on top of a scene.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          S 1 Reply Last reply 11 May 2021, 09:05
          1
          • S Offline
            S Offline
            Selvajothi
            wrote on 11 May 2021, 09:03 last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • S SGaist
              11 May 2021, 08:52

              Hi,

              Why multiple scene under a view ? It's usually the other way around, you have multiple views on top of a scene.

              S Offline
              S Offline
              Selvajothi
              wrote on 11 May 2021, 09:05 last edited by
              #6

              @SGaist
              I have multiple designs . I have to add multiple designs(made of QGraphicsItems) side by side like adding in horizontal layout.

              A 1 Reply Last reply 11 May 2021, 12:33
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 11 May 2021, 11:44 last edited by
                #7

                You can do that in one scene. Just put your items one beside the other. You can use QGraphicsItemGroup to keep those relevant together as a unit. If you want to then visualize each group separately use as many views as needed on top of that scene.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                2
                • S Selvajothi
                  11 May 2021, 09:05

                  @SGaist
                  I have multiple designs . I have to add multiple designs(made of QGraphicsItems) side by side like adding in horizontal layout.

                  A Offline
                  A Offline
                  Asperamanca
                  wrote on 11 May 2021, 12:33 last edited by
                  #8

                  @Selvajothi
                  You could create one QGraphicsWidget per design, then arrange them into one scene using QGraphicsLinearLayout.

                  1 Reply Last reply
                  0

                  6/8

                  11 May 2021, 09:05

                  • Login

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