Software icon indicating copy to clipboard operation
Software copied to clipboard

Remove blocking pop up messages from Thunderscope

Open nimazareian opened this issue 2 years ago • 2 comments

Description of the task

Opening new pop up windows using .exec() causes the main Qt even loop to be blocked which then freezes all of thunderscope GUI. We should consider using .show() instead, possibly with setWindowModality().

More explanation: https://stackoverflow.com/questions/38265985/qdialog-show-vs-open

This is most prevalent in the battery warning pop up (I think):

https://github.com/UBC-Thunderbots/Software/blob/dfe80320f11fdf8bd0b2acb271ae35dd9d6d1220/src/software/thunderscope/robot_diagnostics/robot_info.py#L327-L346

and the newly (to be added at the time of writing this) RobotCrashDialog.

Though we should be careful with this as well, since during an actual game, we're not allowed to touch our laptop to close popups that are blocking the rest of the UI. So we should also consider alternatives to popups that can show the similar msg and it disappears automatically (such as a custom toast GUI components) or have the option to click and show the msg...

Acceptance criteria

  • [ ]

Blocked By

Not necessirally blocked, but part of the changes are in #2940

nimazareian avatar Oct 06 '23 07:10 nimazareian

@sauravbanna can this ticket be closed?

nimazareian avatar Feb 10 '24 01:02 nimazareian

@sauravbanna can this ticket be closed?

Following up on this

nimazareian avatar Mar 30 '24 18:03 nimazareian

I think we can close this, there are no more usages of QMessageBox other than for the Thunderscope help dialog

williamckha avatar Jul 24 '24 15:07 williamckha