console application - no output
-
I have followed the process and build console application. Enabled "terminal " in "options"...
Now the application opens (Linux) "terminal" - takes keyboard OK, but there is no output response...
What did I missed ? -
I have followed the process and build console application. Enabled "terminal " in "options"...
Now the application opens (Linux) "terminal" - takes keyboard OK, but there is no output response...
What did I missed ?@AnneRanch
Can you post your application’s code, especially the parts where it generates output? -
@AnneRanch
Can you post your application’s code, especially the parts where it generates output?I have on;y this
#include <QCoreApplication>
#include <iostream>using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);return a.exec();
}
...I must be missing something....
-
I have on;y this
#include <QCoreApplication>
#include <iostream>using namespace std;
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);return a.exec();
}
...I must be missing something....
@AnneRanch said in console application - no output:
...I must be missing something....
Yes. This application doesn’t produce any output. That’s why there is no output.
-
@AnneRanch before return line type:
cout<<"Hello world"<<endl;
-
@AnneRanch before return line type:
cout<<"Hello world"<<endl;
@Ronel_qtmaster OK - that will post the message, but that is not what I need. Assuming I am actually running Linux "terminal" I expect to act is as "terminal". If i type "sudo lsusb" I expect prompt for password.... as a reply '.
-
@Ronel_qtmaster OK - that will post the message, but that is not what I need. Assuming I am actually running Linux "terminal" I expect to act is as "terminal". If i type "sudo lsusb" I expect prompt for password.... as a reply '.
@AnneRanch
So you want your Qt app to be able to handle any input like a terminal?! WHY?! it does not make any sense unless you really write your own terminal app.
If you want to pass command line arguments to your program, check
QCommandLineParser