Is there any opensource/sample application in qt/c++, just like desktopdock or objectdock..?
XQDE is an OSX-style dock written in Qt.
You could check out the demos and examples section of the documentation:
The demos are slightly larger than the examples, while the examples are focused on showing a specific feature - and good Qt programming. There's also the tutorial, here, which covers the entire development of two simple apps.