Pyqt receipts
1、在QTextBrowser里面显示可打开的文件链接:
直接在TextBrowser里面显示:
self.txbrLogging.append(u'<a href="file:///d://employer.xls">员工统计</a>')
用默认外部工具打开:
self.txbrLogging.append(u'<a href="d://employer.xls">员工统计</a>')
self.txbrLogging.setOpenExternalLinks(True)
2、open dialog and save dialog
open files:
files = QtGui.QFileDialog.getOpenFileName(self, u"打开文件", '', "Text Files (*.*)")
save file:
file = QtGui.QFileDialog.getSaveFileName(self,u"保存文件", '', "Text Files (*.%s)"%'xls')