how to convert qt string to string

C++
QString qs;
// do things
std::cout << qs.toStdString() << std::endl;
Source

Also in C++: