I am finding a way to customize my window title bar for my PyQt4 application. As far as I understand, It  is not possible to use Style-sheet for this purpose. Instead I have to hide the title bar with
.setWindowFlags(QtCore.Qt.FramelessWindowHint) 
and implement my own title bar. This is where I am puzzled as I have seen someone did use a QHboxlayout with QLabel(for window title name) and QButton(for exit,max,min actions) to make one like this

And he used Style-Sheets to decorate each individual widgets. That's probably fine for a simple title bar. But what if I want more complicated title bar like this?

I don't think just by altering Style-Sheets properties will give me this kind of looks.
So,my question is, is it possible to create such a complicated title bar in PyQt4? If so, as a beginner, what should I be looking at? I will dig and learn the concept by myself, I just needs some directions.