problem with QPropertyAnimation in Qt

Posted by belhaouary on Stack Overflow See other posts from Stack Overflow or by belhaouary
Published on 2010-05-17T16:43:48Z Indexed on 2010/05/18 16:30 UTC
Read the original article Hit count: 251

Filed under:
|

Hi , i have a problem with QPropertyAnimation in Qt

my code:

QString my_text = "Hello Animation";
        ui->textBrowser->setText((quote_text));
        ui->textBrowser->show();
        QPropertyAnimation animation2(ui->textBrowser,"geometry");
        animation2.setDuration(1000);
        animation2.setStartValue(QRect(10,220/4,1,1));
        animation2.setEndValue(QRect(10,220,201,71));
        animation2.setEasingCurve(QEasingCurve::OutBounce);
        animation2.start();

till now it seems very good , but the problem is that i can see this animation only when i show a message box after it .

        QMessageBox m;
        m.setGeometry(QRect(100,180,100,50));
        m.setText("close quote");
        m.show();
        m.exec();

when i remove the code of this message box , i can't see the animation anymore. the functionality of the program doesn't require showing this MessageBox at all. Can anybody help?

© Stack Overflow or respective owner

Related posts about qt

Related posts about animation