mirror of
https://github.com/pyqt/examples.git
synced 2025-08-29 04:47:41 +00:00
Fix small bug in text editor
Thanks to @Day0Dreamer for the PR!
This commit is contained in:
commit
2daaf639ac
@ -12,6 +12,8 @@ class MainWindow(QMainWindow):
|
||||
)
|
||||
if answer & QMessageBox.Save:
|
||||
save()
|
||||
if text.document().isModified():
|
||||
event.ignore()
|
||||
elif answer & QMessageBox.Cancel:
|
||||
e.ignore()
|
||||
|
||||
@ -76,4 +78,4 @@ def show_about_dialog():
|
||||
about_action.triggered.connect(show_about_dialog)
|
||||
|
||||
window.show()
|
||||
app.exec_()
|
||||
app.exec_()
|
||||
|
Loading…
x
Reference in New Issue
Block a user