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

Qt 5 compatibility docs incorrect on equivalency of old QGraphicsItem::rotate()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.4.0
    • 5.2.1
    • Documentation

    Description

      The compatibility docs for QGraphicsItem::rotate() state that the equivalent of the old rotate() method is:

      setRotation(rotation() + angle);
      

      This is not correct. Rotation done using setRotation() does not combine with transformations. The old rotate() did combine with existing transformations.

      The proper equivalent of

      item->rotate(angle);
      

      is

      item->setTransform(QTransform().rotate(angle), true);
      

      Attachments

        For Gerrit Dashboard: QTBUG-39027
        # Subject Branch Project Status CR V

        Activity

          People

            vertries Nico Vertriest (Inactive)
            russ_w Russell Warren
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes