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. [SOLVED] QDockWidget issue
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] QDockWidget issue

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.5k 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.
  • H Offline
    H Offline
    HornetMaX
    wrote on 30 May 2014, 22:21 last edited by
    #1

    Hi all,

    I have a main window with a central widget (top right) and 3 QDockWidgets: one is dockable only in the bottom area and causes no trouble, the two others are dockable to the left or right. At startup they are both on the left.

    I've made a quick video to show it better: "QDockWidget problem":http://youtu.be/JkLeHHDxE4w

    Let's call these two QDockWidgets QDW1 and QDW2. If I drag QDW2 I can undock it, so far so good.
    When I want to dock it (on the left) I have three options: I can dock it above QDW1, below it (its original position) or kind of "at the same place as QDW1". This last option leads to my QDW2 disappearing, as shown from second 0:15 f the video.

    You'll notice that from second 0:21 I use menu actions to try to un-hide my QDW2 with no success.

    But hiding QDW1 works and now I can show QDW2 back. However, un-hiding QDW1 now (second 0:35) leads to some sort of tab widget appearing, but even this does not seem to work as expected (once I click on a tab, my QDW2 disappears again).

    Is there a way to prevent this "overlapping" of widgets ?

    MaX.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 30 May 2014, 22:49 last edited by
      #2

      Hi,

      Looks like you might have found a bug. You should have a QTabBar to allow you to select which dock widget you want to see. You can use the setDockNestingEnabled function to disable that.

      You should also go to the "bug reports system":http://bugreports.qt-project.org and see if something known, if not please open a new report providing a minimal compilable example that shows the behavior.

      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
      • H Offline
        H Offline
        HornetMaX
        wrote on 30 May 2014, 23:27 last edited by
        #3

        Thanks !

        In fact nested docks works fine but tabbed docks do not work. In code:
        @
        setDockOptions(QMainWindow::AllowNestedDocks); // OK
        setDockOptions(QMainWindow::AllowTabbedDocks); // KO
        @

        I tried to create a minimal example but guess what, everything works fine there. So it must be something I'm doing wrong in my code ... maybe some size hint or similar not set ...

        I'll try to have a look, in any case I don't need the nested/tabbed feature in my app.

        MaX.

        1 Reply Last reply
        0
        • H Offline
          H Offline
          HornetMaX
          wrote on 31 May 2014, 11:36 last edited by
          #4

          Just to confirm, the bad was in my code: once tabbed, the widget can be not visible but still shown in the tabbed widget, I wasn't considering that.

          Not a Qt bug then.

          MaX.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 31 May 2014, 20:10 last edited by
            #5

            Sorry for the mix between tabbed and nested.

            Glad you found out

            Happy coding !

            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

            1/5

            30 May 2014, 22:21

            • Login

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