doc = MQSystem.getDocument()
scene = doc.getScene(0)
mainwnd = MQWidget.getMainWindow()
dlg = MQWidget.Dialog(mainwnd)
def b1Clicked(sender):
dlg.close() # <-- internal error
b1 = MQWidget.Button(dlg)
b1.text = "button1"
b1.addClickEvent(b1Clicked)
dlg.execute()
2018-06-02 22:35