I was trying to convert a QString to char* type by the following methods, but they don\'t seem to work.
//QLineEdit *line=new QLineEdit();{just to describe w
The easiest way to convert a QString to char* is qPrintable(const QString& str), which is a macro expanding to str.toLocal8Bit().constData().
str.toLocal8Bit().constData()