Quote Originally Posted by amdreallyfast View Post
What am I doing wrong?
No idea, your code is obviously more than what you have posted.

Quote Originally Posted by amdreallyfast View Post
I found that this code doesn't complain if I provide a 0 (integer zero) as the argument to the QTcpSocket, but why?
0 is the value of a null pointer, so no parent.

Quote Originally Posted by amdreallyfast View Post
As a related followup question, is it possible to use signals and slots to pass data from the thread that has the QTcpSocket to the thread that contains my QGLWidget?
Yes, though you most likely don't need threads here at all (Qt's networking code operates event based by default).

Quote Originally Posted by amdreallyfast View Post
I think I can figure out how to make signals and slots work to call a function in QGLWidget once my custom QTcpSocket object is done reading data, but I don't know how to pass data from one to the other.
Signals can carry arguments. Since it is unlikely that the data received via socket is directly usable by a QGLWidget, you will probably want to receive it in a slot that interprets the data.
Can of course be in a slot of a class derived from QGLWidget, though it is probably cleaner to use a dedicated connection/data handling object instead.

Cheers,
_