We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following code causes this::animate() to be called 21 times every second. // testing double timer syndrome
for (int i = 0; i < 10; i++) { win.setTimerListener(1000, [this] { animate(); }); win.removeTimerListener(); win.setTimerListener(1000, [this] { animate(); }); win.removeTimerListener(); } win.setTimerListener(1000, [this] { animate(); });
The text was updated successfully, but these errors were encountered:
Here is a fix that worked in my particular case. With this change, animate() is called exactly 1 time every second.
// gwindow.cpp void GWindow::removeTimerListener() { removeEventListener("timer"); GThread::runOnQtGuiThread([this]() { while(!_iqmainwindow->_timerIDs.empty()) { auto it = _iqmainwindow->_timerIDs.begin(); _iqmainwindow->timerStop((*it)); } }); // runOnQtGuiThread }
Sorry, something went wrong.
No branches or pull requests
The following code causes this::animate() to be called 21 times every second.
// testing double timer syndrome
The text was updated successfully, but these errors were encountered: