I'm working on a form which has QT widget, I have to set some value in a QTextEdit field. I had to call a function which is declared like :
void SDB::setDescription(const char *Description);
and when I call it by this method (i)
const char * desc = saveOptionsDesLineEditBox->text().toStdString().c_str();
SDB::setDescription(desc);
It shows unrecognised symbol in the widget's text box. but by calling by this second method (ii)
SDB::setDescription(saveOptionsDesLineEditBox->text().toStdString().c_str());
works fine. Why there is difference between these two methods?