[c++] QString to char* conversion

EDITED

this way also works

QString str ("Something");

char* ch = str.toStdString().C_str();