Hello,
I've simple console application and cannot find solution how to wait for some key before exit from it. It's simple with getchar() or std::cin.ignore, but I want to do it with Qt, because for console communication I already use it:
Code inside forever was taken from stackoverflow, but doesn't work for me. Qt 4.7.3Qt Code:
int main() { // ... cout << "Press <ENTER> to exit." << endl; forever { if (!Line.isNull()) { break; } } return 0; }To copy to clipboard, switch view to plain text mode
Do you know some other solutions?
Bookmarks