How get result from QInputDialog?
-
Since Qt have a bug with all QDialogs which created staticly(for single use), i've made it as normal object, set everything up, everything working, but i can't find only one function - for extracting result what user just entered(and pressed OK afterwards).
QInputDialog entrVal; entrVal.setMinimumSize(178, 90); entrVal.setInputMode(QInputDialog::IntInput); entrVal.setLabelText("enter your value"); entrVal.setIntRange(1, 255); entrVal.setIntValue(1); if(entrVal.exec() != 0) int result = entrVal.????????
-
By carefully reading the
documentationdocumentation for QInputDialog::intValue()./edit: copied the wrong link, sorry
-
By carefully reading the
documentationdocumentation for QInputDialog::intValue()./edit: copied the wrong link, sorry
@Christian-Ehrlicher said in How get result from QInputDialog?:
By carefully reading the documentation.
So i suggest you do exactly what you suggested))
It returns result code ,which just mean - return what button user pressed, 1 for accept, 0 for reject button.
Function .result() do not return result.
-
@Christian-Ehrlicher said in How get result from QInputDialog?:
By carefully reading the documentation.
So i suggest you do exactly what you suggested))
It returns result code ,which just mean - return what button user pressed, 1 for accept, 0 for reject button.
Function .result() do not return result.
@Engelard said in How get result from QInputDialog?:
It returns result code ,which just mean - return what button user pressed, 1 for accept, 0 for reject button.
Function .result() do not return result.????
Do you mean you want to get intValue?
-
@Engelard said in How get result from QInputDialog?:
It returns result code ,which just mean - return what button user pressed, 1 for accept, 0 for reject button.
Function .result() do not return result.????
Do you mean you want to get intValue?