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

right aligned text in spinbox sometimes truncated

    XMLWordPrintable

Details

    Description

      QSpinBox does not correctly adjust right-aligned text in some instances, leading to text that is truncated due to running off the right side of the widget.

      To reproduce:

      • Open attached .ui in designer
      • Preview form
      • Select slider
      • Press end

      Expected results:

      • Spin box shows '5000 / 5000', with no space before the text (as it fills the widget completely)

      Actual results:

      • Spin box shows ' 5000 / 5(' with text truncated due to misalignment (the '(' indicates a truncated '0', not an actual '(' character)

      Reproducible:

      • Always, with multiple styles including built-in styles, using above steps. Similar misbehavior is seen sometimes under normal usage.

      Additional Notes:
      Selecting the text in the spin box temporarily fixes the alignment. Also, it seems to be related to the difference in old and new values, as dragging the slider from 0 to the end does not show the problem. I've also seen the same problem without a suffix set on the spin box.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            matthew.woehlke Matthew Woehlke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes