I am trying to fill the default text into LineEdit field of QInputDialog (like filling the old value to rename, for example). Here is the code:
bool dialogResult;
QInputDialog *renameDialog = new QInputDialog();
renameDialog->setTextValue("Test"); // has no effect
QString result = renameDialog->getText(0, "Rename Label", "New name:", QLineEdit::Normal,
"", &dialogResult);
if(result.length() > 0 && dialogResult) setText(result);
How can I set a value to InputDialog
to make it filled by default?