File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,12 @@ def __init__(self):
21
21
self .setIcon (QMessageBox .Warning )
22
22
23
23
self .setText ("Warning: Could not find FFmpeg installation" )
24
- self .setStandardButtons (QMessageBox .Help | QMessageBox .Ignore )
24
+ self .setStandardButtons (
25
+ QMessageBox .Help | QMessageBox .Ignore | QMessageBox .Cancel
26
+ )
25
27
self .setDefaultButton (QMessageBox .Ignore )
28
+ # Enables the cancel button but hides it to allow for click X to close dialog
29
+ self .button (QMessageBox .Cancel ).hide ()
26
30
27
31
# Blocks other application interactions until resolved
28
32
self .setWindowModality (Qt .ApplicationModal )
@@ -57,6 +61,6 @@ def show_warning(self):
57
61
# Shows the dialog
58
62
selection = self .exec ()
59
63
60
- # Selection will either be QMessageBox.Help or QMessageBox.Ignore
64
+ # Selection will either be QMessageBox.Help or ( QMessageBox.Ignore | QMessageBox.Cancel) which can be ignored
61
65
if selection == QMessageBox .Help :
62
66
QDesktopServices .openUrl (QUrl (self .help_url ))
You can’t perform that action at this time.
0 commit comments