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. Problem with QDockWidget placement
Forum Updated to NodeBB v4.3 + New Features

Problem with QDockWidget placement

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 457 Views 1 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.
  • D Offline
    D Offline
    django.Reinhard
    wrote on last edited by
    #1

    Hi,

    I have a prototype, where I use QDockWidget. That widget is allowed for all docking areas.
    Initially the docking widget is placed at the bottom area.
    App looks fine.
    Then I drag the docking to a side-area, which of cause causes the dock-widget to resize.
    Dragging widget from side area to bottom area does not work.

    Don't know, how to proceed.

    Does the docking process depend on some size hints/properties, or how can I change behaviour, so that the widget can be dragged to the bottom area again?

    I guess that there is some relation to current size of docking widget. During testing it happened, that the window width was so high, that dragging from bottom to side area was refused too.

    I'd like to establish docking process without any size restrictions, as both windows are sizeable.

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

      Hi
      That sounds a bit odd. If it's an allowed area then the size should not matter.

      Can you reproduce it with the Dock example?
      alt text

      1 Reply Last reply
      0
      • D Offline
        D Offline
        django.Reinhard
        wrote on last edited by
        #3

        Hi,

        actually no.

        Then I compared both apps, and the biggest difference at quick look is, that I don't have any scrollbars. Just Labels and edits in a formlayout or gridlayout.
        It looks like resizing of central widget works horizontally only.

        mrjjM 1 Reply Last reply
        0
        • D django.Reinhard

          Hi,

          actually no.

          Then I compared both apps, and the biggest difference at quick look is, that I don't have any scrollbars. Just Labels and edits in a formlayout or gridlayout.
          It looks like resizing of central widget works horizontally only.

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

          @django-Reinhard

          HI
          Ok so its not a Qt version issue.

          Do you have anything in central that cannot become smaller. something with setMinimumSize ?

          I dont have any guesses on why it wont dock back again from side to bottom as not seen that before.

          1 Reply Last reply
          0
          • D Offline
            D Offline
            django.Reinhard
            wrote on last edited by django.Reinhard
            #5

            @mrjj said in Problem with QDockWidget placement:

            Do you have anything in central that cannot become smaller. something with setMinimumSize ?

            No, not in central widget.
            But in docking widget I change fontsize based on the available space and set minimum width:

            docking at bottom
            docking at left side

            P.S. sorry - don't know how to embed image preview

            mrjjM 1 Reply Last reply
            0
            • D django.Reinhard

              @mrjj said in Problem with QDockWidget placement:

              Do you have anything in central that cannot become smaller. something with setMinimumSize ?

              No, not in central widget.
              But in docking widget I change fontsize based on the available space and set minimum width:

              docking at bottom
              docking at left side

              P.S. sorry - don't know how to embed image preview

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

              @django-Reinhard

              Hi
              Could you try to create a new DockWidget . Just empty one and see
              if that also does the same?

              Then we know if something that is inside Dock or something else.

              • P.S. sorry - don't know how to embed image preview
                np, it worked clicking on them :9
              1 Reply Last reply
              0
              • D Offline
                D Offline
                django.Reinhard
                wrote on last edited by
                #7

                Good point - thank you!

                I reduced the content of the docking widget to one line and it does not work.
                Then I dragged the dockable to the desktop, where I could resize it on a second step. With the minimal size of the dockable, docking to bottom works.
                Then I played with the size of the dockable and as soon as the size is bigger, than the space, that could be made available by squeezing center widget, dragging to bottom will be refused.

                Well, knowing the behaviour, I could work around it. Not nice, but ok.

                Thank you!

                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