Block user input for the time of animation
-
Hi there!
In my application I have to block user input in the scene for the time of an animation. What is the best way to do that?
Thanks in advance! -
Hello
You should handle end of animation, like:
@
void animationStarted()
{
widget->setEnabled(false);
}void animationFinished()
{
widget->setEnabled(true);
}
@I hope your animation widget have appropriate signals :)
-
it says i cannot redefine these signals, where exactly should i put these?
-
[quote author="zurbek" date="1367224315"]it says i cannot redefine these signals, where exactly should i put these?[/quote]
You don't need to overload them, you just can connect them to your slots. Wide example:
@
..
connect(animatiorInstance, &AnimationClass::animationStarted,
this, &MainWindow::animationStarted);
connect(animatiorInstance, &AnimationClass::animationFinished,
this, &MainWindow::animationFinished);
..void MainWindow::animationStarted()
{
;
}void MainWindow::animationFinished()
{
;
}
@