It doesn't seem like such a thing is possible, not even from Apple's APIs, much less from Qt.
The only solution that comes to mind is pretty rude is to take a screen shot and use some basic image recognition to find the position and size of the dock.
dtech source share