http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html#SocketOption-enum
Socket options are not limited to UDP datagrams. Having said that, Qt only has a limited number of options you can set on a socket. The most common options to actually being able to set. The rest are platform specific stuff.
ASIDE: hardcoded literals, like in your quoted code, are a big no-no. Non-portable and a nightmare to maintain. Whatever you do, at least change those literals to names defined in standard headers.