Hi! I created a property in a subclass of QGraphicsProxyWidget this way:

Qt Code:
  1. class SlideshowItemProxyWidget : public QGraphicsProxyWidget {
  2. Q_OBJECT
  3. Q_PROPERTY(QPointF center READ center WRITE setCenter)
  4. public:
  5. SlideshowItemProxyWidget(QGraphicsItem* parent);
  6. QPointF center();
  7. void setCenter(QPointF point);
  8. };
  9.  
  10. SlideshowItemProxyWidget::SlideshowItemProxyWidget(QGraphicsItem* parent) : QGraphicsProxyWidget(parent) {
  11. }
  12.  
  13. QPointF SlideshowItemProxyWidget::center() {
  14. return QPointF(pos().x() + size().width()/2, pos().y() + size().height()/2);
  15. }
  16.  
  17. void SlideshowItemProxyWidget::setCenter(QPointF point) {
  18. setPos(point.x() - size().width(), point.y() - size().height());
  19. }
To copy to clipboard, switch view to plain text mode 

It seems to work correctly when called. The problem is that it seems it's not called when creating an animation with QPropertyAnimation this way:

Qt Code:
  1. imageItem = (SlideshowItemProxyWidget*)this->addWidget(labelPixmap);
  2. QPropertyAnimation* animNewImage = new QPropertyAnimation(imageItem, "center");
  3. animNewImage->setDuration(IMAGE_TRANSITION_INTERVAL);
  4. animNewImage->setStartValue(QPointF(1000, 0));
  5. animNewImage->setEndValue(view->mapToScene(QPointF((view->width() - imageItem->boundingRect().width()*currentScale)/2,
  6. (view->height() - imageItem->boundingRect().height()*currentScale)/2).toPoint()));
  7. connect(animNewImage, SIGNAL(finished()), this, SLOT(adaptForNewImage()));
  8. animNewImage->start(QPropertyAnimation::DeleteWhenStopped);
To copy to clipboard, switch view to plain text mode 

I placed a breakpoint in the method and it doesn't stop there in this case. Nothing happens indeed. Any idea why?
Thanks for any help!