Hi ,

I'm using QT4.2.2 and I can't use the QTcpSockets (QtNetwork) .
What about you ?

Here is my code :
Qt Code:
  1. #include <QtGui>
  2. #include <QObject>
  3. #include <QTcpSocket>
  4. #include <QtNetwork/QTcpSocket>
  5.  
  6. int main(int argc, char *argv[])
  7. {
  8. QApplication app(argc, argv);
  9.  
  10. QTcpSocket socket = new QTcpSocket();
  11.  
  12. socket->connectToHost("imap.free.fr", 143);
  13.  
  14. if ( !(socket->waitForConnected(-1)) )
  15. {
  16. printf("Unable to connect To Imap Server!\n");
  17. return 0;
  18. }
  19. else printf("Connection OK\n");
  20.  
  21. return app.exec();
  22. }
To copy to clipboard, switch view to plain text mode 

For me, this code produce the following error :
Qt Code:
  1. error: base operand of '->' has non-pointer type 'QTcpSocket'
To copy to clipboard, switch view to plain text mode 

However, I would like to write a small application that will check new mails from an Intranet IMAP server. I wanted to use the libvmime library, but it's difficult to use on Windows 2000... So I need to make my own class to check the mails on the server (no need to display content, no need to send mails, ...).

Do you know if I can produce a socket oriented solution ?
So you know if I can implement a securised connection, like the IMAPs is ? (IMAP on SSL)

Thanks