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?

can we add multiple QGraphicscene to QGraphicsView?

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5
8 Posts 4 Posters 721 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 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.

    raven-worxR 1 Reply Last reply
    0
    • S Selvajothi

      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.

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on 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 last edited by
        #3

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

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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
          1
          • S Offline
            S Offline
            Selvajothi
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • SGaistS SGaist

              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 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
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on 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

                  @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 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

                  • Login

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