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

Marius Cirsta mforce2 at gmail.com
Mon Mar 29 18:14:07 CEST 2010


 OK I checked the run in terminal option and now it works. This was in no
way obvious though and the run in terminal option is a bit hidden away.

 Maybe activate the run in terminal automatically when creating a console
project , making the application output accept input ( or show a one liner
warning that it doesn't ) or just making the run in console option easier to
find ( a search for the settings would be nice especially as more and more
configuration options are available.

 Anyway thanks to all for your help.

On Mon, Mar 29, 2010 at 10:51 AM, Eike Ziller <eike.ziller at nokia.com> wrote:

> 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
>
>
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-creator
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-creator-old/attachments/20100329/bb8a3a1c/attachment.html 


More information about the Qt-creator-old mailing list