Quote Originally Posted by marf View Post
I have also been wondering how to do something like this. I want to use MainWindow, but I want to be able to draw my own titlebar, min, max, close buttons, and menus etc. All using custom graphics I made in photoshop/gimp. Is there any good tutorials/explanation about how to accomplish this?
2 paths to choose:
  1. Stylesheets, see Qt Style Sheets
  2. QStyle, see QStyle - creating custom styles


As for both it's a bit try-and-learn. There are some limitations on both.

What you can do to achieve a similar look to itunes is :
a) set your QMainWindow borderless, use a stylesheet on the QMenuBar. create a subclassed QMenu object and create a "title-like" stylesheet for that one. When creating the menubar, add your menuitems, then add a stretch, add your logo/title, add stretch, add padding after the stretch that is the same as the menuitems before... Lot of tuning hassle and work, but in theory it should work.

b) reimplement the drawing of a mainwindow entirely, and write it all by hand


c) QStyle as mentioned above.

for the windows+m issue, when using a borderless window, you might have to call: QWidget::activateWindow() on your mainwindow to get keyboard focus.

cheers,
Leif