Hey trolls,
Consider the following code:

Qt Code:
  1. socketNotifier = new QSocketNotifier(0, QSocketNotifier::Read, q);
  2. socketNotifier->setEnabled(true);
  3.  
  4. QObject::connect(socketNotifier, SIGNAL(activated(int)), q, SLOT(onReadyRead()));
  5.  
  6. QFile file;
  7. if (file.open(0, QFile::WriteOnly) == true)
  8. {
  9. QTextStream stream(&file);
  10. stream << "lol";
  11. file.close();
  12. }
To copy to clipboard, switch view to plain text mode 

My onReadyRead() slot never gets called.

Why ?