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. Docking widgets in the parent widget.
Forum Updated to NodeBB v4.3 + New Features

Docking widgets in the parent widget.

Scheduled Pinned Locked Moved Unsolved General and Desktop
16 Posts 3 Posters 1.3k 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.
  • jsulmJ jsulm

    @jenya7 said in Docking widgets in the parent widget.:

    In the document all widgets and layouts created in the code. Isn't it insane a bit?

    Which document? Do you mean in the documentation?
    Right-Click in designer on an empty place of your tab_terminal (not in Object tree) - then you should be able to add layout.
    See https://doc.qt.io/qt-5/designer-layouts.html

    J Offline
    J Offline
    jenya7
    wrote on last edited by
    #7

    @jsulm said in Docking widgets in the parent widget.:

    @jenya7 said in Docking widgets in the parent widget.:

    In the document all widgets and layouts created in the code. Isn't it insane a bit?

    Which document? Do you mean in the documentation?
    Right-Click in designer on an empty place of your tab_terminal (not in Object tree) - then you should be able to add layout.
    See https://doc.qt.io/qt-5/designer-layouts.html

    I did so. Still no docking, also the tab looks good (no red sign).
    qt_layout4.png
    Also I noticed on tab_params - in properties window there is a Layout section, on tab_terminal - no Layout section.
    qt_layout5.png

    jsulmJ 1 Reply Last reply
    0
    • J jenya7

      @jsulm said in Docking widgets in the parent widget.:

      @jenya7 said in Docking widgets in the parent widget.:

      In the document all widgets and layouts created in the code. Isn't it insane a bit?

      Which document? Do you mean in the documentation?
      Right-Click in designer on an empty place of your tab_terminal (not in Object tree) - then you should be able to add layout.
      See https://doc.qt.io/qt-5/designer-layouts.html

      I did so. Still no docking, also the tab looks good (no red sign).
      qt_layout4.png
      Also I noticed on tab_params - in properties window there is a Layout section, on tab_terminal - no Layout section.
      qt_layout5.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #8

      @jenya7 Your centralWidget also does not have a layout.

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      0
      • jsulmJ jsulm

        @jenya7 Your centralWidget also does not have a layout.

        J Offline
        J Offline
        jenya7
        wrote on last edited by jenya7
        #9

        @jsulm said in Docking widgets in the parent widget.:

        @jenya7 Your centralWidget also does not have a layout.

        I assigned a layout to centralWidget. Now tab_terminal has a Layout section but still no docking.

        I suppose not every widget is dockable. Also in the tab_terminal I arranged all widgets in frames.

        jsulmJ 1 Reply Last reply
        0
        • J jenya7

          @jsulm said in Docking widgets in the parent widget.:

          @jenya7 Your centralWidget also does not have a layout.

          I assigned a layout to centralWidget. Now tab_terminal has a Layout section but still no docking.

          I suppose not every widget is dockable. Also in the tab_terminal I arranged all widgets in frames.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #10

          @jenya7 said in Docking widgets in the parent widget.:

          I suppose not every widget is dockable

          Not sure what you mean with "dockable"?

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          J 1 Reply Last reply
          0
          • jsulmJ jsulm

            @jenya7 said in Docking widgets in the parent widget.:

            I suppose not every widget is dockable

            Not sure what you mean with "dockable"?

            J Offline
            J Offline
            jenya7
            wrote on last edited by jenya7
            #11

            @jsulm said in Docking widgets in the parent widget.:

            @jenya7 said in Docking widgets in the parent widget.:

            I suppose not every widget is dockable

            Not sure what you mean with "dockable"?

            It means all child widgets resized along with a parent widget. In Visual Studio we have a Dock property, also it has an Anchor property that allows to "glue" a child to a parent on top, bottom, left, right.
            Too bad I have so much pain for so simple operation.

            jsulmJ JonBJ 2 Replies Last reply
            0
            • J jenya7

              @jsulm said in Docking widgets in the parent widget.:

              @jenya7 said in Docking widgets in the parent widget.:

              I suppose not every widget is dockable

              Not sure what you mean with "dockable"?

              It means all child widgets resized along with a parent widget. In Visual Studio we have a Dock property, also it has an Anchor property that allows to "glue" a child to a parent on top, bottom, left, right.
              Too bad I have so much pain for so simple operation.

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #12

              @jenya7 Then something is still wrong with your layouts. For example you have widgets in your tab, but they are not layed out in a layout.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J jenya7

                @jsulm said in Docking widgets in the parent widget.:

                @jenya7 said in Docking widgets in the parent widget.:

                I suppose not every widget is dockable

                Not sure what you mean with "dockable"?

                It means all child widgets resized along with a parent widget. In Visual Studio we have a Dock property, also it has an Anchor property that allows to "glue" a child to a parent on top, bottom, left, right.
                Too bad I have so much pain for so simple operation.

                JonBJ Offline
                JonBJ Offline
                JonB
                wrote on last edited by JonB
                #13

                @jenya7
                Just to be explicit. You see in your screenshots that widgets which do not have a layout assigned are shown with a red "no-entry" symbol in the Object Browser in Designer. You should go through every widget at every level in your hierarchy ensuring that not a single one has that no-entry sign. Until you have done that rigorously you cannot rely on the layout behaviour of your UI. At least get that crossed off your potential issue list.

                J 1 Reply Last reply
                0
                • JonBJ JonB

                  @jenya7
                  Just to be explicit. You see in your screenshots that widgets which do not have a layout assigned are shown with a red "no-entry" symbol in the Object Browser in Designer. You should go through every widget at every level in your hierarchy ensuring that not a single one has that no-entry sign. Until you have done that rigorously you cannot rely on the layout behaviour of your UI. At least get that crossed off your potential issue list.

                  J Offline
                  J Offline
                  jenya7
                  wrote on last edited by
                  #14

                  @JonB
                  I did so. Every widget in the tab has its layout and the tab itself also. Nevertheless I have no docking and it's frustrating. I consider to stick to a console application.

                  jsulmJ JonBJ 2 Replies Last reply
                  0
                  • J jenya7

                    @JonB
                    I did so. Every widget in the tab has its layout and the tab itself also. Nevertheless I have no docking and it's frustrating. I consider to stick to a console application.

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by
                    #15

                    @jenya7 said in Docking widgets in the parent widget.:

                    I consider to stick to a console application

                    You should not give up just because you have some issues at the beginning.
                    Layouts can be frustrating at the beginning, but once you understood how they work they are very handy.
                    You can upload your app (you can remove everything not related to this issue or what you don't want to share) to somewhere then I can take a look and fix it.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    1
                    • J jenya7

                      @JonB
                      I did so. Every widget in the tab has its layout and the tab itself also. Nevertheless I have no docking and it's frustrating. I consider to stick to a console application.

                      JonBJ Offline
                      JonBJ Offline
                      JonB
                      wrote on last edited by
                      #16

                      @jenya7 said in Docking widgets in the parent widget.:

                      I consider to stick to a console application.

                      That would seem to be a most retrograde step!

                      Your current application achieves (or attempts to achieve) an awful lot more than a response-by-response command-line program would. For a first UI application it does quite a lot (tabs, frames, widgets...), so it might be expected that it would take a bit of time to get it right. Effort which will aid you in future UI additions. So as @jsulm says from where you are now it would be good if you choose to persist with the UI.

                      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