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. Scene handover from one view to another
Forum Updated to NodeBB v4.3 + New Features

Scene handover from one view to another

Scheduled Pinned Locked Moved General and Desktop
qgraphicssceneqgraphicsview
6 Posts 3 Posters 1.5k Views 3 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.
  • N Offline
    N Offline
    nanoandrew4
    wrote on last edited by
    #1

    So I am making a game, and I am trying to make the main menu transition to the game without the window closing and opening a new one, which is what is happening now. I want it so when a user hits play, in the same window, the game loads. I tried using extern to reuse the view and scene, which did not work. Any help is greatly appreciated.

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Try with other sample ?
      like this
      http://www.bogotobogo.com/Qt/Qt5_QGraphicsView_QGraphicsScene.php
      Where the view and scene are pointers.
      And you can easy add a button that clears scene and Insert new stuff.
      hope it helps

      N 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        Try with other sample ?
        like this
        http://www.bogotobogo.com/Qt/Qt5_QGraphicsView_QGraphicsScene.php
        Where the view and scene are pointers.
        And you can easy add a button that clears scene and Insert new stuff.
        hope it helps

        N Offline
        N Offline
        nanoandrew4
        wrote on last edited by
        #3

        @mrjj Thank you very much! I finally solved the issue by externing the view pointer and creating a new scene for the view to work on.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi,

          Externing ? What do you mean by that ?

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

          mrjjM 1 Reply Last reply
          0
          • SGaistS SGaist

            Hi,

            Externing ? What do you mean by that ?

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @SGaist
            I read it as
            extern SomeClass *globalPointer;
            :)
            could be very wrong though.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @mrjj I read it the same but hope it's not the case.

              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
              0

              • Login

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