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

QPainter::drawText method truncates inputs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • P4: Low
    • Resolution: Done
    • 6.2.1
    • 6.2.5, 6.4.0 Beta1
    • GUI: Painting
    • None
    • MSVC 2019
    • Windows
    • cc42d90eb4 (qt/qtbase/dev) cc42d90eb4 (qt/tqtc-qtbase/dev) d39700e125 (qt/tqtc-qtbase/6.2) 1893134145 (qt/qtbase/6.3) 1893134145 (qt/tqtc-qtbase/6.3)

    Description

      In 6.2.1, there is input trunctation for

      void QPainter::drawText(const QRectF &rectangle, int flags, const QString &text, QRectF *boundingRect = nullptr)

       

      Text does not draw with very large x and y. This issue was encountered drawing with y = 8.38868e+06.

      The method works correctly in version 5.15.2 without prematurely converting large values.

      Further, the standard integer method works

      void QPainter::drawText(int x, int y, const QString &text)

      A workaround is to use painter.translate(x, y) before and painter.translate(-x, -y) after the call.

      Attachments

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

        Activity

          People

            vgt Eirik Aavitsland
            johndtill John Till
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes