Results 1 to 3 of 3

Thread: QTextStream & QByteArray

  1. #1
    Join Date
    Mar 2009
    Location
    Russia, Nizhny Novgorod
    Posts
    17
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default QTextStream & QByteArray

    Hello folks,

    I've a very simple scratch of a code:


    qt Code:
    1. QTextStream Stream(&Data);
    2. Stream << "string";
    To copy to clipboard, switch view to plain text mode 
    After execution of the code Data is absolutely empty. Is it a bag or I misunderstood something?
    P.S. I debugged QTextStream:perator<< and it seems that QTextStream sees no problem.

    Thank you!

  2. #2
    Join Date
    Jul 2009
    Posts
    139
    Thanks
    13
    Thanked 59 Times in 52 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QTextStream & QByteArray

    Call Stream.flush();

  3. The following user says thank you to numbat for this useful post:

    ixSci (9th June 2010)

  4. #3
    Join Date
    Mar 2009
    Location
    Russia, Nizhny Novgorod
    Posts
    17
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTextStream & QByteArray

    numbat, thank you.

Similar Threads

  1. QTextStream object
    By ShamusVW in forum Qt Programming
    Replies: 4
    Last Post: 20th November 2009, 07:16
  2. QTextStream under Mac OS X
    By hunsrus in forum Qt Programming
    Replies: 0
    Last Post: 14th September 2009, 09:49
  3. Replies: 9
    Last Post: 25th July 2009, 13:27
  4. QTextStream
    By WXNSNW in forum Qt Programming
    Replies: 1
    Last Post: 16th November 2008, 16:43
  5. QTextStream help pls
    By munna in forum Newbie
    Replies: 5
    Last Post: 16th May 2006, 18:45

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.