def showLog(self, message, title='', parent=None): """ Show the log in a simple modal dialog. """ dlg = KDialog(parent) if title: dlg.setCaption(title) dlg.setButtons(KDialog.ButtonCode(KDialog.Close)) dlg.setMainWidget(self.log) self.log.writeMsg(message, 'msgerr') dlg.setInitialSize(QSize(500, 300)) return dlg.exec_()