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

QCheckBox size hint includes padding for the text when no text exists

    XMLWordPrintable

Details

    • 515f6a8c3dbe382bbb4f84f758a61c719143d8a6

    Description

      1. Create a QCheckBox without any text.
      2. Place check box in a layout (vertical or grid) and make it center aligned.
      3. Add some other items into the layout (QLabel for example).

      Result: The check box width (size hint) includes text padding on the right even when the text is empty. This will cause the check box to not be properly centered compared to other items in the layout. The fix is in the sizeHint() code; the text width should be ignored if text() is empty.

      Attachments

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

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            sthomass Stian Sandvik Thomassen (closed Nokia identity) (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes