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

Weird documentation for ItemSceneHasChanged and ItemSceneChange in QGraphicsItem::GraphicsItemChange

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 4.7.4
    • 4.7.1
    • Documentation
    • None
    • 719a3079e5675936bc72b65121ac0a0245e29d62

    Description

      ItemSceneChange: The item is moved to a new scene. This notification is also sent when the item is added to its initial scene, and when it is removed. The value argument is ...

      ItemSceneHasChanged: The item's scene has changed. The value argument is the new scene (i.e., a pointer to a QGraphicsScene). ...

      But actually:
      1) ItemSceneHasChanged is also sent when the item is added to its initial scene or removing from scene.
      2) ItemSceneChange happens right before scene change (scene() points to old scene) and ItemSceneHasChanged happens right after scene change (scene() points to new scene).

      That is not obvious so better put that into documentation. Something like:

      ItemSceneChange: The item is prepared for moving to a new scene. This notification is also sent before the item is added to its initial scene, and when it is removed. scene() points to old scene. The value argument is ...

      ItemSceneHasChanged: The item is moved to a new scene. This notification is also sent when the item is added to its initial scene, and when it is removed. scene() points to new scene. ...

      Sorry for bad English.

      Attachments

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

        Activity

          People

            dm Geir Vattekar
            lapidarno Denis Pesotsky
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes