June 16, 2012

ahura_24 ahura_24
Ant Farmer
98 posts

QPropertyAnimation problem

 

hi every body . this is my code

  1. #include <QtGui>
  2.  
  3. int main(int argc, char **argv)
  4. {
  5.     QApplication app(argc, argv);
  6.  
  7.     QWidget window;
  8.     window.resize(640, 480);
  9.  
  10.     QPropertyAnimation pa(&window, "size");
  11.     pa.setStartValue(QSize(0, 0));
  12.     pa.setEndValue(QSize(640, 480));
  13.     pa.setDuration(1000);
  14.  
  15.     pa.start();
  16.     window.show();
  17.  
  18.     return app.exec();
  19. }

i have one problem. if you run this code your window start in the uncorrect position because the property case that window resize to QSize(0, 0) in the begining. how can i fix it?
tnx

0 replies

 
  ‹‹ How to properly cancel QNetworkAccessManager request?      Custom network download intermrrent failures ››

You must log in to post a reply. Not a member yet? Register here!