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

The space reserved for the text of a QDockWidget tab is not enough in some situations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.7.2
    • GUI: Other
    • None
    • Linux/X11

    Description

      Hi all,

      I was pretty sure this was a KDE issue, so I filed Bug #489516: https://bugs.kde.org/show_bug.cgi?id=489516 . There, I was told they're sure it's an upstream bug, and I should report it here. So here we go:

      Using a Plasma 6 desktop and Noto Sans 10pt as the font, it happens that when tabifying QDockWidgets of a Qt 6 program, the resulting tab texts are sometimes cut off, although there would be enough space. Please see the attached screenshots. This happens both with Breeze and Fusion, so I think it's no style issue.

      I can produce this exact behavior on my Gentoo desktop and also on my Artix notebook. Both running plasma 6.1.1, Gentoo with Qt 6.7.1, Artix with 6.7.2.

      This does not happen when using a Plasma 5 desktop, neither for a Qt 5 build, nor for a Qt 6 build. Everything is fine using Plasma 5. I tried this using a current KUbuntu in a QEMU VM. Both the Qt 5 and 6 builds of my demo don't cut off the text.

      But I could also reproduce this using am OpenSUSE Tumbleweed QEMU VM, running a Plasma 6 desktop. Here, the Qt 5 build looks fine, but the Qt 6 build cuts off the text, just as with my Gentoo and Artix machines.

      Interestingly, the cutoff does not happen when:

      • Another font is used
      • Noto Sans is used, but another size (9 or 11)
      • The docks are not hidden first
      • The docks are hidden after a small delay, e.g. by a QTimer::singleShot waiting 100 ms (0 ms has the same result as hiding them directly)
      • The name of the cut off dock is slightly changed, e.g. from "Ergebnisse" to "ErgebnisseX", "Ergebnisse " or similar
      • The name of the "Extras" menu entry is changed, e.g. from "Extras" to "X" (how can that ever affect this at all?!)

      Well, as said, this is an odd one ... I'd really love to help tracking this down if I can!

      Attachments

        1. breeze.png
          10 kB
          Tobias Leupold
        2. demo.pro
          0.1 kB
          Tobias Leupold
        3. fusion.png
          11 kB
          Tobias Leupold
        4. main.cpp
          0.2 kB
          Tobias Leupold
        5. MainWindow.cpp
          1 kB
          Tobias Leupold
        6. MainWindow.h
          0.2 kB
          Tobias Leupold
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            l3u Tobias Leupold
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes