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):
2727 self .layout ().addWidget (self .submit_btn )
2828 self .cancel_btn = qtw .QPushButton (
2929 '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
3134 )
3235 self .layout ().addWidget (self .cancel_btn )
3336 self .show ()
Original file line number Diff line number Diff line change @@ -94,7 +94,10 @@ def __init__(self):
9494 file_menu .addSeparator ()
9595
9696 # 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 )
98101
99102 # connect to a Qt Slot
100103 edit_menu .addAction ('Undo' , self .textedit .undo )
You can’t perform that action at this time.
0 commit comments