iswaryasenthilkumar
19th June 2015, 10:57
bool ok;
QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"),
tr("Are you Sure,Do you Want to delete the Image ,Yes Or NO"), QLineEdit::Normal,
QDir::home().dirName(), &ok);
if (ok && !text.isEmpty())
{
//some action
}
actually my above code executing properly..i have doubt in output of this Qinputdialog
i getting output
QInputDialog::getText()
Are you Sure,Do you Want to delete the Image ,Yes Or NO
from the user input i getting default input(username) i need user inputtext as empty..what was mistake in above code??
please help me
QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"),
tr("Are you Sure,Do you Want to delete the Image ,Yes Or NO"), QLineEdit::Normal,
QDir::home().dirName(), &ok);
if (ok && !text.isEmpty())
{
//some action
}
actually my above code executing properly..i have doubt in output of this Qinputdialog
i getting output
QInputDialog::getText()
Are you Sure,Do you Want to delete the Image ,Yes Or NO
from the user input i getting default input(username) i need user inputtext as empty..what was mistake in above code??
please help me