Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- How to make sure Qt Widget.repaint has finished running?
- //Scene is a QGraphicScene
- //View is a QGraphicView
- //Camera is a camera object
- Scene.setBackgroundBrush(Qt::Blue)
- View.repaint()
- Camera.Capture()
- View->setCaptureInProgress(true);
- Scene.setBackgroundBrush(Qt::Blue);
- void view::paintEvent(QPaintEvent *event) {
- // let the original painting occur
- QGraphicsView::paintEvent(event);
- if (captureInProgress) {
- Camera.Capture();
- captureInProgress = false;
- // reset the background
- // ...
- }
- }
Add Comment
Please, Sign In to add comment