QPropertyAnimation problem



  • hi every body . this is my code
    @
    #include <QtGui>

    int main(int argc, char **argv)
    {
    QApplication app(argc, argv);

    QWidget window;
    window.resize(640, 480);
    
    QPropertyAnimation pa(&window, "size");
    pa.setStartValue(QSize(0, 0));
    pa.setEndValue(QSize(640, 480));
    pa.setDuration(1000);
    
    pa.start();
    window.show();
    
    return app.exec();
    

    }
    @

    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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.