Hi all,
I spent some time trying to see the signal bytesWritten working over a QBuffer instance, but without any succes... I post here a little example of my code.

Qt Code:
  1. QBuffer buffer;
  2. char ch;
  3.  
  4. connect(&buffer,SIGNAL(bytesWritten(qint64)),this,SLOT(test(qint64)));
  5.  
  6. buffer.open(QBuffer::ReadWrite);
  7. buffer.write("Qt rocks!");
  8. buffer.seek(0);
  9. buffer.getChar(&ch); // ch == 'Q'
  10. qDebug("%c",ch);
  11. buffer.getChar(&ch); // ch == 't'
  12. qDebug("%c",ch);
  13. buffer.getChar(&ch); // ch == ' '
  14. qDebug("%c",ch);
  15. buffer.getChar(&ch); // ch == 'r'
  16. qDebug("%c",ch);
To copy to clipboard, switch view to plain text mode 

this is the test SLOT:

Qt Code:
  1. void classname::test()
  2. {
  3. qDebug("test test test");
  4. }
To copy to clipboard, switch view to plain text mode 

The code compile without any problem, but the signal bytesWritten is always absent!!!
I hope someone can help me, because I'm stuck on this annoying problem.

In my opinion could be a Qt bug, but since I'm a novice in Qt4 programming, I like to discuss with someone expert (or guru... ) before thinking bad things!!!

A possible workaround is to define a new QIODevice subclass in which I have to reimplement the bytesWritten signal in order to create a new QBuffer working subclass!
But I hope to make the original one working!

Best regards,
Alessandro