Qt-interest Archive, May 2007
about QDataSteam
Message 1 in thread
Hi,
How to writer output to the stdout(a shell terminal ,etc.) by using
QDataStream?
Regards
Fengli
Message 2 in thread
You can achieve this by using the stdout file descriptor like so:
QFile file;
file.open(stdout, QIODevice::WriteOnly);
QDataStream out(&file);
QString test = "hello world!\n";
out << test;
Hope that helps,
Stuart
> Hi,
> How to writer output to the stdout(a shell terminal ,etc.) by using
> QDataStream?
> Regards
> Fengli
--
[ signature omitted ]
Message 3 in thread
Stuart Childs wrote:
> You can achieve this by using the stdout file descriptor like so:
>
> QFile file;
> file.open(stdout, QIODevice::WriteOnly);
> QDataStream out(&file);
> QString test = "hello world!\n";
> out << test;
>
> Hope that helps,
>
> Stuart
If you are compiling on Win32, you also need to add
CONFIG += console
to your project file. Otherwise nothing will be written to stdout
>
>> Hi,
>> How to writer output to the stdout(a shell terminal ,etc.) by using
>> QDataStream?
>> Regards
>> Fengli
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
> "unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/
--
[ signature omitted ]