Update mainwindow.cpp

QString has method toAscii(), no need to fist cast it to std::string and then use c_str()