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

QPainter::drawText() does not change a bounding rect of the QPicture

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P4: Low
    • None
    • 4.6.2
    • GUI: Painting
    • None
    • Qt 4.6.2, Windows, MinGW

    Description

      If I draw a text over QPicture object with QPainter::drawText() the size of the QPicture object does not change.
      Here is a small example:

      ------
      QPicture canvas;
      QPainter painter;

      painter.begin(&canvas);
      painter.drawRect(10, 10, 100, 100);
      painter.end();
      qDebug() << canvas.boundingRect();

      painter.begin(&canvas);
      painter.drawRect(10, 10, 100, 100);
      painter.drawText(10, 10, "Long text outside of the box");
      painter.end();
      qDebug() << canvas.boundingRect();
      ------

      Attachments

        Activity

          People

            Unassigned Unassigned
            white_owl George Brink
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: