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

QFontMetricsF::boundingRect(() always returns integer values

    XMLWordPrintable

Details

    Description

      The following program prints twice the same line, even though one would expect a rect with floating coordinates from QFontMetricsF:

      #include <QtGui>

      int main(int argc, char* argv[])
      {
      QApplication app(argc, argv);

      QFont font;
      font.setPointSizeF(12.231);
      font.pixelSize();
      QFontMetricsF fmf(font);
      QFontMetrics fm(font);
      qDebug() << fmf.boundingRect("ABC");
      qDebug() << fm.boundingRect("ABC");

      return 0;
      }

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            vhilshei Volker Hilsheimer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes