QtGui.QInputDialog.getText default value

i want to make an input dialog with default value "/" on QInputDialog.getInt it works by adding the number as parameter. doesnt work for me with getText.

Using Python3.4 and PyQt4

Works:

port,port_check = QtGui.QInputDialog.getInt(self,"FTP-Server Port","FTP-Server Port (meist 21):",21)

Doesnt work

pfad, pfad_check = QtGui.QInputDialog.getText(self, 'FTP-Server Verzeichnis', 'FTP-Server Verzeichnis ( / ):','/')

any ideas?

Upvotes: 1

Views: 1982

Answers (1)

works with:

pfad, pfad_check = QtGui.QInputDialog.getText(self, 'FTP-Server Verzeichnis', 'FTP-Server Verzeichnis ( / ):',text='/')

Upvotes: 2

Related Questions