[Qt-creator] cin doesn't work on Linux

Eike Ziller eike.ziller at nokia.com
Mon Mar 29 09:51:50 CEST 2010


Hi,

did you check the "Run in Terminal" option in your application's run configuration?
The standard "Application Output" pane that is integrated into Qt Creator is no real console emulation,
so to get your app run in a real terminal (as specified in the Environment|General preferences) you need to check it.

++ Eike

On Mar 28, 2010, at 11:35 PM, ext Marius Cirsta wrote:

>  Thanks for your answers. I should have posted the code I'm using when trying this. It's now attached to this mail. As you can see I'm using standard c++ code an not anything Qt related. I of course used std:: and all that stuff. My problem is that when trying to input something everything just hangs. I write something then press ENTER then I write something again then press ENTER again but it just doesn't work , the input is not accepted and the program doesn't move one no matter what I do.  Using Muhammad Bashir Al-Noimi's code I get the same thing. Nothing after cin is executed no matter what I do.
>  If this code works for you under Linux I'm guessing it might just be a bug and I should report it as such. I might be something related to the xterm -e that's mentioned under Environment, General  ( Options ) . Can you take a look and see what setting you have there.
>  I'm using a less known distribution , Frugalware and Qt is version 4.6.2 ( the same version was used to compile Qt Creator from source code )  on a 32 bit environment. 
> 
> On Sun, Mar 28, 2010 at 2:14 PM, Marius Cirsta <mforce2 at gmail.com> wrote:
>  I just wrote a simple program to use std::cin under Linux and I can't get it to work with Qt Creator 1.3.1. I get the application output but it doesn't recognize the ENTER key and so doesn't accept the input value that I type. My terminal is set the xterm -e unde Environment, General.
>  
>  Any solutions to this ?
> 
> <try.tar><ATT00001..txt>

-- 
Eike Ziller
Software Engineer
Nokia, Qt Development Frameworks

Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori







More information about the Qt-creator-old mailing list