We came up with a weird problem. We have a Widget with a few buttons, when clicking on one the widget should expand down, showing a progress bar.

The thing is that if we do:
Qt Code:
  1. void frmCreateKeys::slotGenerateKey()
  2. {
  3. if (!validatePage())
  4. return;
  5.  
  6. /// Animate the frame, to grow and show the progress bar
  7. QPropertyAnimation animationFrame(this, "geometry");
  8. animationFrame.setDuration(300);
  9. animationFrame.setEndValue(QRect(this->pos().x()+7,this->pos().y()+30, this->width(), this->height() + 60));
  10. animationFrame.start();
  11.  
  12. ui->msgLabel->setVisible(true);
  13. ui->pBar->setVisible(true);
  14. this->repaint();
  15.  
  16. emit createKey(); // a long task
  17. }
To copy to clipboard, switch view to plain text mode 

it doesnt animate, meaning the widget doesnt expand down. Now if we change the animationFrame variable to be a pointer, then everything works fine.
Qt Code:
  1. /// Animate the frame, to grow and show the progress bar
  2. QPropertyAnimation *animationFrame = new QPropertyAnimation (this, "geometry");
To copy to clipboard, switch view to plain text mode 

Any ideas why this could be happening?