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

QToolBoxButton does not fit to label

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.6, 6.2.0
    • Widgets: Style Sheets
    • None
    • All, Windows

    Description

      When customizing QToolBox with css/qss fails, when changing the label size of the QToolBoxButton / QToolBox:tab.

      QWidget {
          font-family: "Segoe UI", "Open Sans", Helvetica, Sans-serif;
          background: #fff;
          border: none;
      }
      
      QToolBox::tab {
          background: rgba(197, 197, 197, 0.21);
          font-size: 16px;
          font-weight: 500;
          color: #000100;
          padding: 6px;
          border: none;
      }
      

      Produces a QToolBox like this:

      Also, when I try to use QFontMetrics from the child casted to an QAbstractButton it returns a size of QSize

      {2,0}

      .

      Attachments

        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
            febbe Fabian Keßler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes