Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
4.6.3
-
None
Description
*NOTE: Sorry, I just wanted to reopen the bug (as I was instructed after the previous bug was closed), but I do not see a "reopen" link anywhere. Thus, I've had to clone the original bug twice just to add information. That process might be worthy of a bug report itself....*
itemChange() is not called when a QGraphicsItem is rotated, even if QGraphicsItem::ItemSendsGeometryChanges is turned on. This is contrary to the documentation. As far as I can tell, there is absolutely no way to receive rotation notifications.
#include <QtGui> class Item : public QGraphicsRectItem { protected: virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) { if (change == QGraphicsItem::ItemTransformChange) QMessageBox::information(0, "", "TransformChange"); return value; } }; int main(int argc, char ** argv) { QApplication app(argc, argv); QGraphicsScene scene; QGraphicsRectItem *item = new Item; item->setFlag(QGraphicsItem::ItemSendsGeometryChanges, true); scene.addItem(item); item->setTransform(QTransform(2, 0, 0, 2, 0, 0)); item->setRotation(45); return app.exec(); }