def displaylog_totextedit(self):
'''
This method displaying Design messages(log messages)to textedit widget.
'''
afile = QtCore.QFile('./Connections/Shear/Finplate/fin.log')
if not afile.open(QtCore.QIODevice.ReadOnly): # ReadOnly
QtGui.QMessageBox.information(None, 'info', afile.errorString())
stream = QtCore.QTextStream(afile)
self.ui.textEdit.clear()
self.ui.textEdit.setHtml(stream.readAll())
vscrollBar = self.ui.textEdit.verticalScrollBar();
vscrollBar.setValue(vscrollBar.maximum());
afile.close()
评论列表
文章目录