mirror of
https://github.com/pyqt/examples.git
synced 2025-08-23 01:57:10 +00:00
Add comment
This commit is contained in:
parent
2daaf639ac
commit
4136d26d37
@ -13,6 +13,9 @@ class MainWindow(QMainWindow):
|
||||
if answer & QMessageBox.Save:
|
||||
save()
|
||||
if text.document().isModified():
|
||||
# This happens when the user closes the Save As... dialog.
|
||||
# We do not want to close the window in this case because it
|
||||
# would throw away unsaved changes.
|
||||
event.ignore()
|
||||
elif answer & QMessageBox.Cancel:
|
||||
e.ignore()
|
||||
|
Loading…
x
Reference in New Issue
Block a user