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. Is it possible to have a window in a window?
Forum Updated to NodeBB v4.3 + New Features

Is it possible to have a window in a window?

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 5 Posters 5.3k Views 2 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.
  • AsimovA Offline
    AsimovA Offline
    Asimov
    wrote on last edited by
    #1

    In case you don't understand my question I will explain.
    Is it possible to create a container which has other windows inside.
    An example of this would be photoshop. When you run photoshop you can open up new windows for images, but they reside in the main program window. Of course in photoshop you can also pull these windows out of the main application as well.

    Is it possible to do this in QT?

    ShamzicS 1 Reply Last reply
    0
    • AsimovA Asimov

      In case you don't understand my question I will explain.
      Is it possible to create a container which has other windows inside.
      An example of this would be photoshop. When you run photoshop you can open up new windows for images, but they reside in the main program window. Of course in photoshop you can also pull these windows out of the main application as well.

      Is it possible to do this in QT?

      ShamzicS Offline
      ShamzicS Offline
      Shamzic
      wrote on last edited by Shamzic
      #2

      @Asimov said in Is it possible to have a window in a window?:

      an open up new windows for images, but they reside in the main program window. Of course in photoshop you can also pull these windows out of the main application as well.
      Is it possible to do this in QT?

      Hey, yes, maybe you could use QWidget::createWindowContainer().

      Or you can do smoething like this : http://stackoverflow.com/questions/1518317/how-to-show-another-window-from-mainwindow-in-qt

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

        Hi,

        Do you mean QDockWidgets in a QMainWindow ?

        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
        • G Offline
          G Offline
          Gerd
          wrote on last edited by
          #4

          Hi,
          that could be done with QMdiArea and QMdiSubWindow.

          AsimovA 1 Reply Last reply
          1
          • AsimovA Offline
            AsimovA Offline
            Asimov
            wrote on last edited by Asimov
            #5

            This is a screenshot of photoshop and this is the kind of thing I am looking for. Resizable and closable windows inside the application window.

            0_1492944407626_windowinwindow.jpg

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

              The image upload is currently broken. See here for how to share images.

              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
              1
              • AsimovA Offline
                AsimovA Offline
                Asimov
                wrote on last edited by
                #7

                @SGaist
                I know you said it is broken, but I can see the image. When you told me it was broken I cleared my cache, shut down mozilla and then restarted it, and the image still shows up in QT.

                Will however look at that link you posted for me.

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

                  You can see it without any problem for a while. However others might not be able to do that as it's the case now.

                  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
                  1
                  • AsimovA Offline
                    AsimovA Offline
                    Asimov
                    wrote on last edited by Asimov
                    #9

                    @SGaist
                    I hope you can see this one. Sent it to photobucket. This is the kind of thing I want to achieve. Multiple windows in my application, but inside my main window.
                    WindowInWindow

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

                      Then take a look at @Gerd class suggestions, they are what you are looking for.

                      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
                      • G Gerd

                        Hi,
                        that could be done with QMdiArea and QMdiSubWindow.

                        AsimovA Offline
                        AsimovA Offline
                        Asimov
                        wrote on last edited by Asimov
                        #11

                        @Gerd
                        I will look into QMdiArea and QMdiSubWindow.

                        Thanks

                        PS. Found this tutorial. It is all in a foreign languge, but I got the gist of it, so QMidiArea is the one I need to use
                        https://www.youtube.com/watch?v=Rh64jrrx0bw

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

                          Good

                          Since these classes are what you were looking for, please mark the thread as solved using the "Topic Tools" button so that other forum users may know a solution has been found :)

                          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
                          1
                          • AsimovA Offline
                            AsimovA Offline
                            Asimov
                            wrote on last edited by
                            #13

                            @SGaist
                            Yes sorry, meant to mark it as solved yesterday, but didn't get around to it. Will do it now.

                            1 Reply Last reply
                            0
                            • AsimovA Offline
                              AsimovA Offline
                              Asimov
                              wrote on last edited by
                              #14

                              @Gerd & @SGaist
                              Thanks for the help and I thought I would show you this screenshot. I only got it working woohoo.
                              This will be the start of my second application in QT. I am taking baby steps with this one though, but this is a start.
                              windowinwindow

                              1 Reply Last reply
                              3

                              • Login

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