PDA

View Full Version : Does Qt4 have a QSocket class?



shino14
1st April 2015, 03:22
Hi, I'm a newbie here, i was planning to create a simple Email client without using QDesktopServices.
I did some little research about QSocket class but it seems Qt4 doesn't have Qsocket class or QTcpSocket and QAbstractSocket.

Thank you, Sorry for my english.

jefftee
1st April 2015, 04:01
http://doc.qt.io/qt-4.8/qtcpsocket.html

Edit: If you are just starting out with Qt, why not start with Qt5?

shino14
1st April 2015, 04:17
http://doc.qt.io/qt-4.8/qtcpsocket.html

Edit: If you are just starting out with Qt, why not start with Qt5?

I'm currently using Qt 4.7.3, does it mean that it does not have any socket class?

jefftee
1st April 2015, 04:19
I don't know, but I assume you have googled to find old Qt 4.7.3 documentation? Why do you have to use such an old version?

Edit: http://qt-project.org/doc/qt-4.7/qtcpsocket.html

shino14
1st April 2015, 04:42
Well, I'm just trying to use something old and different. :) Is there have any other class rather than QSocket?

jefftee
1st April 2015, 04:48
The class is QTcpSocket and my prior post was edited to contain the link to the Qt 4.7.3 documentation, but I highly suggest you start with Qt5 instead of Qt 4.7.3.

You will find that you will get better help with more recent versions of Qt, so if you don't actually have a requirement to use Qt 4.7.3, take the time to upgrade to Qt5 before you start coding.

Also, you will find people are more likely to help if you've clearly read the documentation and have usage questions where you can show code that you have tried instead of asking questions that are covered in the documentation.

Good luck.

wysota
1st April 2015, 17:59
Qt4 does have both QTcpSocket and QAbstractSocket since 4.0.0. There is no QSocket class in Qt4. I think there was one in Qt3 but that was ages ago.