PDA

View Full Version : change the text colour in Menubar



chinmayapadhi
15th August 2010, 19:58
Hi ,

I want to change the text colour in the menubar to white but unable to do so. I am using stylesheets but not able to do so . My source code is below , please sujjest if something is wrong.

menuBar = new QMenuBar;
menuBar->setFixedHeight(24);
QString ss("background-color: black; colour:black;" \
"QMenuBar::item { background: black; colour: black }");
menuBar->setStyleSheet(ss);

fileMenu = new QMenu(tr("&File"), this);
exitAction = fileMenu->addAction(tr("E&xit"));
menuBar->addMenu(fileMenu);

Please give a source code or correct the above

alexisdm
16th August 2010, 01:31
The name of the property is color not colour, so it's "color: white".