PDA

View Full Version : Color of Titlebar and Menubar



sabeesh
16th August 2007, 07:33
Hi,
How can I load a picture into menubar as background ? And how can I set the color of Titlebar of MainWindow as black?

Please help me...

jpn
16th August 2007, 09:41
How can I load a picture into menubar as background ?
Customizing QMenuBar (http://doc.trolltech.com/4.3/stylesheet-examples.html#customizing-qmenubar)


And how can I set the color of Titlebar of MainWindow as black?
Window decoration is not provided by Qt but the underlying window system. The only thing you can do about it is to create a frameless window and draw a fake, custom title bar. Just be aware that in this case you have to handle window movement and resizing by hand too.

sabeesh
16th August 2007, 11:07
Hi,
I can't solve my probs using Customizing QMenuBar. My requirement is, I want to set the color or menubar. We can do it using
menubar->setPalette(QPalette(QColor::QColor ( 160 , 176, 201 )));
But I need a mixing of colors. So I create a .png file with that color and save it. I need to load that picture as background of menubar. How can I do it?
Please help me

jpn
16th August 2007, 11:12
Take a look at The Box Model (http://doc.trolltech.com/4.3/stylesheet-customizing.html#box-model) and List of Properties (http://doc.trolltech.com/4.3/stylesheet-reference.html#list-of-properties). Hint: "background-image".