ich habe einen Modalen Dialog. Aus diesem möchte ich nach einer auswahl von parametern ein Filedialog öffnen.
Code: Alles auswählen
from PyQt5 import QtCore, QtGui, QtWidgets
from Database.DatabaseOperations import *
class CreateReport_Dialog(object):
ownerId = None
firmId = None
format = None
def setupUi(self, createreport):
createreport.setObjectName("Dialog")
createreport.resize(400, 300)
self.buttonBox = QtWidgets.QDialogButtonBox(createreport)
self.buttonBox.setGeometry(QtCore.QRect(20, 230, 341, 32))
...
def createReport(self):
msgbx = DataChangeMsgBx()
check_input_list = self.check_input()
print(check_input_list)
if len(check_input_list) > 0:
error_strg = "\n".join(check_input_list)
msgbx.checkInputsMsgBx(error_strg)
else:
print("==== self:", self)
fileName = QFileDialog.getSaveFileName(self, 'Dialog Title', '/path/to/default/directory', selectedFilter='*.txt') #Fehler
Code: Alles auswählen
TypeError: getSaveFileName(parent: QWidget = None, caption: str = '', directory: str = '', filter: str = '', initialFilter: str = '', options: Union[QFileDialog.Options, QFileDialog.Option] = 0): argument 1 has unexpected type 'CreateReport_Dialog'
VG niesel