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. retractable side panel
Forum Updated to NodeBB v4.3 + New Features

retractable side panel

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 5 Posters 3.8k 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.
  • F Offline
    F Offline
    federico.massimi
    wrote on last edited by
    #1

    Hi I would like to create a retractable side panel, for example like the ones in QtCreator

    0_1563645310671_A1.PNG
    or
    0_1563645321981_B1.PNG

    What comes to mind is simply creating a widget that holds the panel, then add it or remove it from the layout when the button is pressed. But I would like to ask if there is a better or more efficient way, for example if I have to add7remove a very complex panel I am afraid of having lag or a non-fluid ui.

    Can anyone tell me which is the best way?

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

      Hi
      You can check out DockWidgets.
      They provide dockable panels.
      https://doc.qt.io/qt-5/qtwidgets-mainwindows-dockwidgets-example.html

      F 1 Reply Last reply
      3
      • mrjjM mrjj

        Hi
        You can check out DockWidgets.
        They provide dockable panels.
        https://doc.qt.io/qt-5/qtwidgets-mainwindows-dockwidgets-example.html

        F Offline
        F Offline
        federico.massimi
        wrote on last edited by
        #3

        @mrjj
        hello, thanks for the answer, I looked at the example Dock Widgets Example but it is not what I would like to do, with a QDockWidget I can create a floating panel, I need it to disappear and reappear, exactly like in the QTcreator screenshots I sent.

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

          Hi
          ok, there is not exactly a widget like the one Creator uses.
          I think its a customized DockWidget but i have not verified it.
          Hence i suggested using docks that as a base. I know you are not interested in the floating part
          but the docked part and the ability to stack more than one in the same area seemed handy.

          You could go and see what Creator uses
          https://code.woboq.org/qt5/qt-creator/

          F 1 Reply Last reply
          1
          • F federico.massimi

            Hi I would like to create a retractable side panel, for example like the ones in QtCreator

            0_1563645310671_A1.PNG
            or
            0_1563645321981_B1.PNG

            What comes to mind is simply creating a widget that holds the panel, then add it or remove it from the layout when the button is pressed. But I would like to ask if there is a better or more efficient way, for example if I have to add7remove a very complex panel I am afraid of having lag or a non-fluid ui.

            Can anyone tell me which is the best way?

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5
            This post is deleted!
            1 Reply Last reply
            0
            • mrjjM mrjj

              Hi
              ok, there is not exactly a widget like the one Creator uses.
              I think its a customized DockWidget but i have not verified it.
              Hence i suggested using docks that as a base. I know you are not interested in the floating part
              but the docked part and the ability to stack more than one in the same area seemed handy.

              You could go and see what Creator uses
              https://code.woboq.org/qt5/qt-creator/

              F Offline
              F Offline
              federico.massimi
              wrote on last edited by
              #6

              @mrjj
              From the QTCreator source code it seems that it simply call the setVisible metood that the "Side panel" inherits from QWidget.
              Actually it works, but all doubts about the performance of the graphic interface remain.

              Pl45m4P 1 Reply Last reply
              0
              • F federico.massimi

                @mrjj
                From the QTCreator source code it seems that it simply call the setVisible metood that the "Side panel" inherits from QWidget.
                Actually it works, but all doubts about the performance of the graphic interface remain.

                Pl45m4P Offline
                Pl45m4P Offline
                Pl45m4
                wrote on last edited by
                #7

                @federico.massimi

                You mean, because Qt Creator just hides the parts and doesnt delete them?
                If the Widget would get deleted after hiding to MenuBar, all the content would be gone, if you restore it. The console output works, even if you hide the console window


                If debugging is the process of removing software bugs, then programming must be the process of putting them in.

                ~E. W. Dijkstra

                1 Reply Last reply
                0
                • VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by
                  #8

                  You can probably use something like: https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  1 Reply Last reply
                  2
                  • F Offline
                    F Offline
                    federico.massimi
                    wrote on last edited by
                    #9

                    @VRonin
                    this is very interesting.

                    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