Answer the question
In order to leave comments, you need to log in
How to grab input values in showDialog()?
Hello!
There are fields where the user enters numbers and the sign of the action, as well as a fourth field where the result of the action is shown. How to pull out value that is entered?
initUI(self)
self.btn = QPushButton('Dialog', self)
self.btn.move(20, 20)
self.btn.clicked.connect(self.showDialog)
self.value_a = QLineEdit(self)
self.value_a.move(150, 22)
int, oka = QInputDialog.getInt(self, 'Input Dialog','ввести значение A:')
if oka:
self.value_a.setText(str(int)) #<= на экране в полосочке выводит а вот выхватить значение не могу
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question