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

QStaticText::size() returns unreasonably large width for plain text

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P1: Critical P1: Critical
    • 4.7.0
    • 4.7.0
    • GUI: Text handling
    • None

      Run the following example:

      #include <QtGui>
      
      int main(int argc, char **argv)
      {
          QApplication app(argc, argv);
      
          QStaticText staticText("FOOBAR");
          qDebug() << staticText.size();
      }
      

      While the height of the bounding rect seems to be correct, the layout is much too wide. On Windows 7 it yields the results:

      QSizeF(8.38861e+06, 13) 
      

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

            esabraha Eskil Abrahamsen Blomfeldt
            esabraha Eskil Abrahamsen Blomfeldt
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes