A Qt 4.8.1 C++ console application using OpenCV 2.4.2 is reading and displaying USB webcam images via the highgui module. It creates a window for displaying an image (using Qt internally itself I think) using the function
void namedWindow(const string& winname, int flags=WINDOW_AUTOSIZE )
However, I am missing how to convert the string to a format that does not end up as unreadable / scrambled / garbage characters. This is what I have tried:
QString windowname = "My View";
namedWindow( windowname.toStdString() );
How can the QString be converted to something the function displays correctly?