almo
16th May 2012, 22:37
Hi!
I have a subclass of QGraphicsRectItem. The mouseMoveEvent handler looks like this:
void BTNodeGraphicsItem::mouseMoveEvent(QGraphicsSceneM ouseEvent* event)
{
QGraphicsRectItem::mouseMoveEvent(event);
qDebug() << rect().x() << " " << rect().y();
}
The item drags like I expect. But the qDebug statement outputs the same coordinates as I drag it. Shouldn't the rect be changing as it is dragged?
I have a subclass of QGraphicsRectItem. The mouseMoveEvent handler looks like this:
void BTNodeGraphicsItem::mouseMoveEvent(QGraphicsSceneM ouseEvent* event)
{
QGraphicsRectItem::mouseMoveEvent(event);
qDebug() << rect().x() << " " << rect().y();
}
The item drags like I expect. But the qDebug statement outputs the same coordinates as I drag it. Shouldn't the rect be changing as it is dragged?