c++ - Qt : how to automate looped slider movement in the background? -


A button is pressed, so what is the easiest approach to move the slider to a slider at a speed? I am feeling that a thread has been included in the frame, which periodically sends the appropriate signals to the slider. Is there an example of a canonical approach to do this?

i QPropertyAnimation to start the job simply start value, end value and curve Set which you want to change the value

  QPropertyAnimation * animation = new QPropertyAnimation (slider, "sliderpages"); // Defined duration (how long should the animation run - when value will decrease, then less) Animation-> Set period (1000); // Set the Start Price - In this case, check that the slider will have values ​​in the range of animation-> Setstart Value (slider-> minimal;);); // Start value similar to animation-> Set and value (slider-> maximum ()); // easingCurve defines whether it goes directly or N-content animation jumping-> Set ESSCV (QEasingCurve :: Outcubic); // like coyote has been mentioned, you can also get it in the form of animation (credit also ;;)) 1-1 defines to run animation forever- & gt; Set Lopcast (LoopCount) Animation - & gt; Start ();  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -