1 2 3 4 5
text, ok = QInputDialog.getText(self, "QInputDialog.getText()", "User name:", QLineEdit.Normal, QDir.home().dirName()) if ok and text: textLabel.setText(text)