-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src/mainwindow.cpp: don't draw on screen until ready
The OS signal handler can't be installed until after the Qt event loop starts since it eventually calls `QApplication::exit(0);`, and that will cleanup anything we draw on the screen. Thus we don't want to connect any slots that touch the what's in focus or draw on the screen until the OS signal handler is ready. `mainwindow->init()` is called in `src/main.cpp` before `app.exec()`, thus we don't want to connect any slots that draw on screen in `mainwindow->init()`. Instead, `mainwindow->init()` will connect the `setupWindow()` slot, to the the `signalHandlerInstalled` Qt signal emitted by `this->handler`. At that point the OS signal handler has been installed and it is safe to draw on the screen.
- Loading branch information
1 parent
dfae33f
commit bdf6813
Showing
4 changed files
with
38 additions
and
20 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
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