Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QPropertyAnimation problem
Qt 6.11 is out! See what's new in the release blog

QPropertyAnimation problem

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ahura_24
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved