Hi,
I'm creating a console application. I've created it in the Qt Creator with New File or Project (...) and I've changed the main just like this:
Qt Code:
#include <QtCore/QCoreApplication> #include <iostream> int main(int argc, char *argv[]) { std::cout << "hello" << std::endl; return a.exec(); }To copy to clipboard, switch view to plain text mode
The only problem around this is that when I run it it does not seem to finish. I have to terminate the program "roughly" by switching off the popping console window or running it from a command promt using Ctrl+C. In the Creator I get the message:
F:\(mypath)\myproject-build-desktop\release\myproject.exe exited with code -1073741510
I've found this thread:
http://www.qtcentre.org/threads/3620...-order-of-code
but it does not seem to work for me or I'm not using it nice.
So at last the question is:
How to finish a qt console application correctly?
In the future it has to happen at specific eventy, most likely at a keyboard press, now how to achieve that? (I've seen that once somewhere, but I cannot find it anymore.)
Szilvi
Bookmarks