You don't have to add a real button to the window. Instead of that , you should draw the icon on that window and judge if you clicked the icon area when mouse click event occurred.
If you do want to use the button ,I think you can try setStyle(QStyle*) or even setMask(QBitmap*) hehe.