📜  qfiledialog python save - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:03.079000             🧑  作者: Mango

代码示例1
def file_save(self):
        name = QtGui.QFileDialog.getSaveFileName(self, 'Save File')
        file = open(name,'w')
        text = self.textEdit.toPlainText()
        file.write(text)
        file.close()