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

Qt Designer: Cannot change span of QTabWidget within QGridLayout by dragging

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.2
    • 5.8.0
    • Tools: Designer
    • None
    • All
    • b2a1066e108678aa66d7e6f22cadf9c01d646ec9 (qttools/7.7.2017, 5.9.2)

    Description

      Qt Creator prevents tab widgets in grid layouts from being resized to span multiple columns and/or rows. This issue appears to predate Qt 5 and, as of this writing, is nearly a decade old. As evidenced by a popular StackOverflow question dated 2010-06-23, this issue and its various workarounds are well-known throughout the Qt community. Too well-known.

      The buck stops here. Decade-old unresolved issues sadden humanity, which is bad. Fortunately, this particular issue is trivial to replicate:

      1. Open Qt Creator.
      2. Create a new Qt Widgets application with default settings.
      3. In the Projects view, open the new untitled / Forms / mainwindow.ui file.
      4. Add a Tab Widget to the centralWidget of this window.
      5. Select the centralWidget in the Object view.
      6. Select the Lay Out in a Grid button in the toolbar.
      7. Add a Text Edit to the left of the existing Tab Widget in this Grid Layout.
      8. Add a second Text Edit below the existing Text Edit in this Grid Layout, thus adding an empty cell below the Tab Widget.
      9. Select the Tab Widget.
      10. Attempt to resize this widget into the empty cell by dragging the control knob at the bottom border of this widget downward. Note that doing so is silently ignored. Unlike all other widgets, the Tab Widget silently refuses to be resized across multiple grid cells.

      Curiously, the most popular and effective workaround at present is to:

      1. Temporarily convert the desired Tab Widget into a Tool Box.
      2. Resize this Tool Box as desired.
      3. Convert this Tool Box back into a Tab Widget.

      Doing so resets all tab titles to the empty string and thus is slightly destructive. All other Tab Widget content is preserved as is, however.

      A permanent solution would be most appreciated. In the meantime, thanks for all the ongoing Qt goodness! 

      Attachments

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

        Activity

          People

            kleint Friedemann Kleint
            leycec Cecil Curry
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes