You can use c_str() to get a const char* from a std::string but that pointer will only stay valid for as long as the string is not destroyed/modified.
const char* ss = (*it2)->toString().toStdString().c_str();
doSomethingWith(ss); // ERROR: The data pointed to by ss is no longer valid.
If you just want to pass it to a function on the same line it is OK because the string has not yet been destroyed.
doSomethingWith((*it2)->toString().toStdString().c_str()); // OK
If you want to use it on more than one line you could store the string in a variable to extend the lifetime of the pointer.
std::string str = (*it2)->toString().toStdString();
const char* ss = str.c_str();
doSomethingWith(ss); // OK
doSomethingElseWith(ss); // OK
If you want a non-const char* you can use &str[0] instead of str.c_str().