Hi.
I am trying to figure out how to take user input from console application. I cant handle console input after qcoreapplication.exec() runs. Any advice?
Hi.
I am trying to figure out how to take user input from console application. I cant handle console input after qcoreapplication.exec() runs. Any advice?
use standard std::cin.
Qt Assistant -- rocks!
please, use tags [CODE] & [/CODE].
why do u want console input after that..could you please clarify ur problem
Use QSocketNotifier on stdin. When you're notified, you can do your reading.
I wrote a very simple console app that playback audio with phonon. The problem is I want user to control playback ( play, pause, stop etc. ) with simple commands from console. But the code I wrote after exec(), never reached as qcoreapplication enters event loop. BTW, I cant control phonon before exec() because it doesnt do anything before exec();
So what I need is to take user input from console after qcoreapplication enters its event loop.
And I am just writing this app to learn qt. As a Java dev I am trying to figure out qt mechanisms
Bookmarks