How to use the new QtCreator for console input/output?
Sorry for my english, I am using a translator!
Today updated Qt. Now Qt 5.7.1, QtCreator 4.2
I can not understand how to use it is now :-)
A simple console application in pure C++.
Previously, when I run the application appeared a separate console. In it I had stdin (cin >>) and stdout (cout <<).
Now stdout is written directly into QtCreator box below. And how to use stdin I can not understand (((
Can you try this ?
Click "Run in terminal" to ON
@mrjj Great thank you!!!!
In the new version a bit redesigned, but the problem is solved in this way !!!
Yes there are many new things :)
Also note if using on win 10, there is new flat look to match win 10.
"Sorry for my english, I am using a translator!"
Seems to work pretty well :)
@mrjj I use Ubuntu :-)
and about "Run in terminal" - maybe it's a bug in my.
"Run in terminal" enabled by default, but it does not work. I have to turn off / on and then works properly. In previous versions, this was not ...
Heh ok then flat win 10 style is pretty not exciting :)
Hmm that is a bit odd.
What was the version you upgraded from ?
@mrjj today I download Qt 5.7.1 for Linux 64-bit (729 MB)
It's free install. Now Qt 5.7.1, QtCreator 4.2
Earlier was 5.7.0
@mrjj I used to so never encountered ...
and today was puzzled :-)
So it changed between 5.7.0 and 5.7.1 ?
maybe it's just me ...
Maybe the .user file was damaged
and the setting did not really work.
Before you reset it.
@mrjj I specifically removed ~/.config/QtProject
still must disable/enable "Run in terminal"
work at least now there is a solution on the forum :-)
in the project folder
there is a .user file
same name as the .pro
Did u try delete that?
(not sure it does anything. just to check)
It is not work. I delete .user file....
It's something in new Qt ot QtCreator.... and maybe only in Linux...
Tomorrow I will try to install on Windows, and then write ...
Yes it could be as its different on win / linux with the "console"
Good test :)
I try on two my PC with Windows 10 (home and work). And everywhere I must recheck (turn off/on) "Run in terminal". It's bug in new version.
Ok. let me see if i get bug when upgrading. :)
It is very interesting. I use clean installation on Ubuntu and Windows.
And for exemple free C++ project and free Qt console project.
In C++: cout << "Hello" << endl;
In Qt: qDebug() << "Hello";
@mrjj hi I have the same problem, too
It seems that qt creator didn't write the "run in terminal" option
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
in the pro.user file after the project created by the wizard
the "UseTerminal" line above will be writed into the pro.user file only if I manually uncheck and check this option in the project setting .
I tried to find a config file of Qt4Project in the qtcreator to correct its behavior but failed,.
Could you please give me some advice to fix this problem?
Thanks in advance.
Does sounds the same. Flip flopping the settings makes it save it.
I upgraded via maintenance tool but here the settings does seems to work.
I just found that if using Qbs I will not encounter this problem, maybe it is the problem of qt4projectmanager, now I just use Qbs in my project for workaround.
Ok. If it is a bug it most likely get fixed in next release. I have not
tried yet to fully reproduce it. Seems not to happen every time.