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. Update question
Qt 6.11 is out! See what's new in the release blog

Update question

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.8k 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. i have one thread or function that change the location of one button in 'for' statement or ..... i want to show this change like animation . (exactly in recursion function i want update my forms to show my data)
    i do this in .net with refresh() function.i use update() and repaint() int Qt but dont works!
    please help me.

    for example
    @
    for (int i = 0; i < 10; i++) {
    listWidget->addItem( "--" );
    this->update(); // i want in each step display changes in my application!

        Sleep( 100 );
    }
    

    @

    1 Reply Last reply
    0
    • D Offline
      D Offline
      dbzhang800
      wrote on last edited by
      #2

      ;-) Never try to use Sleep() in your main thread (gui thread).


      In addition,

      You can try to use QTimer, or call QCoreApplication::processEvents() manually.

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ahura_24
        wrote on last edited by
        #3

        but how can i show movement of button in my widget ?!! i want show this movement like animation :-(

        1 Reply Last reply
        0
        • D Offline
          D Offline
          dbzhang800
          wrote on last edited by
          #4

          [quote author="ahura_24" date="1336083806"]but how can i show movement of button in my widget ?!! i want show this movement like animation :-([/quote]
          QTimer

          or

          QTimeLine

          or

          the powerful Animation Framework provided by Qt 4.6 +

          or

          ...

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ahura_24
            wrote on last edited by
            #5

            ummm tnx but do you have article about of ? how can i learn ?

            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