When I run the file dialogs_2.py I get the output as follows when I click the button:
click False
Traceback (most recent call last):
File “dialogs_2.py”, line 52, in button_clicked
dlg = CustomDialog(self)
TypeError: init() takes 1 positional argument but 2 were given
/tmp/geany_run_script_RMW6N0.sh: line 7: 120311 Aborted (core dumped) /usr/bin/python “dialogs_2.py”
I found a fix by changing this line in CustomDialog to include the arg parameter:
class CustomDialog(QDialog):
def init(self, arg)