Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-19836

Nested QDockWidgets lose splitter handles

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 4.7.1
    • Widgets: Main Window
    • None
    • Red Hat Linux EL6, running under the GNOME desktop environment.

    Description

      If I try to use nested QDockWidgets, I eventually lose the ability to resize the dock widget areas. (using the QSplitter).

      Here is some simple PyQt4 code to show the bug. Create a qtbug.py file, and then run it with the python interpreter. Once you launch the app, drag Dock #3 from the Lower-Right corner, to the middle of the application, to create a equal 1/3 split of the window area between the three docks, as shown in the attached screen capture.

      Now, try dragging the sliders to the left and right of Dock #3. (one of them should fail to select)

      from PyQt4.QtGui import *
      from PyQt4.QtCore import *
      
      app = QApplication([])
      
      mainWin = QMainWindow()
      mainWin.setWindowTitle("My QMainWindow")
      mainWin.resize(QSize(800, 800))
      
      dockOpts = mainWin.dockOptions()
      mainWin.setDockOptions(dockOpts | \
         #QMainWindow.AnimatedDocks | \
          QMainWindow.AllowNestedDocks | \
          QMainWindow.AllowTabbedDocks)
      
      mainWin.show()
      
      #central = QWidget(mainWin)
      #central.setFixedSize(0,0)
      #mainWin.setCentralWidget(central)
      
      dockWid1 = QDockWidget(mainWin)
      label1 = QLabel("DockWid1 widget", dockWid1)
      dockWid1.setWidget(label1)
      mainWin.addDockWidget(Qt.LeftDockWidgetArea, dockWid1)
      
      dockWid2 = QDockWidget(mainWin)
      label2 = QLabel("DockWid2 widget", dockWid2)
      dockWid2.setWidget(label2)
      mainWin.addDockWidget(Qt.RightDockWidgetArea, dockWid2)
      
      dockWid3 = QDockWidget(mainWin)
      label3 = QLabel("DockWid3 widget", dockWid3)
      dockWid3.setWidget(label3)
      mainWin.addDockWidget(Qt.RightDockWidgetArea, dockWid3)
      
      app.exec_()
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            joelongson Joe Longson
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes