-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connect WTimer's timeout() signal first in constructor
This is so that you can add a slot that restarts a singleshot timer. Otherwise, you have to make sure you connect the slot after calling start(). This code wouldn't work properly: timer->setSingleShot(true); timer->timeout().connect([timer]{ timer->start(); }); timer->start(); Because this would cause: start(), start(), stop() This: timer->setSingleShot(true); timer->start(); timer->timeout().connect([timer]{ timer->start(); }); would correctly cause: start(), stop(), start()
- Loading branch information
1 parent
6f92c4e
commit 1141a15
Showing
2 changed files
with
3 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters