when i try to make this project it works normal, but nothing appears in the console window. i can ´t show a simple cout<<"hello world". someone knows what's happening?
i newbie i qt creator...
when i try to make this project it works normal, but nothing appears in the console window. i can ´t show a simple cout<<"hello world". someone knows what's happening?
i newbie i qt creator...
Last edited by crisHerald; 20th May 2013 at 11:50.
Cristiano Araujo
Design and programming are human activities; forget that and all is lost.
Stroustrup, Bjarne
can you post the contents of your .pro file & main.cpp file
Qt Code:
#include <iostream> using namespace std; int main() { cout << "Hello World!" << endl; return 0; }To copy to clipboard, switch view to plain text mode
Qt Code:
TEMPLATE = app CONFIG += console CONFIG -= qt SOURCES += main.cppTo copy to clipboard, switch view to plain text mode
but when i try the same on windows 7 it works fine! i don know what's happening!
Cristiano Araujo
Design and programming are human activities; forget that and all is lost.
Stroustrup, Bjarne
What you have there is the generic, wizard-created "Non Qt-project, Plain C++" program.
I am assuming your first attempt was on a Linux box.
If you are running the program from inside Qt Creator then there are two possible places the output is going:
- Into a terminal window that pops up, shows your program output, and waits for you to "Press <RETURN> to close this window...". This is the default created by the wizard.
- Into the "Application Output" pane if the "Run in terminal" option is off. Find this option in Projects, Build & Run, Run settings.
Some terminal programs have an issue with being used in Qt Creator (e.g. KDE konsole) and, of course, one needs to be installed. Under Tools menu, Options, Environment, General tab check the "Terminal" settings. It is probably "xterm -e". If so, check that you have xterm installed or launching your program with it will fail with an error in the Program Output pane.
Screenshot from 2013-05-21 11:37:59.jpg
screenshot
nothing appears on console .
only the cursor's mouse
Cristiano Araujo
Design and programming are human activities; forget that and all is lost.
Stroustrup, Bjarne
I guess whatever Ubuntu is using as a terminal ("Terminal") is similarly afflicted. Change it to "xterm -e" and install xterm, or set the project to not run in a terminal as described above.Originally Posted by Me
Last edited by ChrisW67; 21st May 2013 at 22:51.
i have this istalled:
x-terminal-emulator -e
is the right terminal? how can i download the right?
Cristiano Araujo
Design and programming are human activities; forget that and all is lost.
Stroustrup, Bjarne
Replace that with:
If nothing happens because xterm is not installed:
Or use whatever Ubuntu's graphical package manager is to do the same thing.Qt Code:
sudo apt-get install xtermTo copy to clipboard, switch view to plain text mode
Then find a Ubuntu beginners' guide and read some of it.
http://ubuntu-manual.org/
http://www.ubuntupocketguide.com/
crisHerald (23rd May 2013)
Bookmarks