File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ def __init__(self):
27
27
self .layout ().addWidget (self .submit_btn )
28
28
self .cancel_btn = qtw .QPushButton (
29
29
'Cancel' ,
30
- clicked = self .destroy
30
+ # Errata: The book contains this line:
31
+ #clicked=self.destroy
32
+ # It should call self.close instead, like so:
33
+ clicked = self .close
31
34
)
32
35
self .layout ().addWidget (self .cancel_btn )
33
36
self .show ()
Original file line number Diff line number Diff line change @@ -94,7 +94,10 @@ def __init__(self):
94
94
file_menu .addSeparator ()
95
95
96
96
# add an action with a callback
97
- quit_action = file_menu .addAction ('Quit' , self .destroy )
97
+ # Errata: The book contains this line:
98
+ #quit_action = file_menu.addAction('Quit', self.destroy)
99
+ # It should call self.close instead, like so:
100
+ quit_action = file_menu .addAction ('Quit' , self .close )
98
101
99
102
# connect to a Qt Slot
100
103
edit_menu .addAction ('Undo' , self .textedit .undo )
You can’t perform that action at this time.
0 commit comments