Good practice?
-
-
I would go for the composition pattern (socket as attribute in the class). You seem to not want to change the socket's behaviour or add some functionality to it (what would be an indicator for using inheritance). It's the same as with a QTextEdit - if you just use it, you will not inherit it, but use it as an attribute :-)