maybe the confusion here is my semi pseudo code:
const char * c_string = str.toStdString().c_str();
QString str = "Some string";
const char * c_string = str.toStdString().c_str();
To copy to clipboard, switch view to plain text mode
not
const char * c_string
= QString().
toStdString().
c_str();
const char * c_string = QString().toStdString().c_str();
To copy to clipboard, switch view to plain text mode
I agree putting the latter line into code would probably segfault or return NULL to the pointer. Sorry for the confusion.
Bookmarks