Hi,
How can I set the background color of menu bar as black in a QMainWindow.
Printable View
Hi,
How can I set the background color of menu bar as black in a QMainWindow.
try same code as main window.
change m_pMenu with your menu variable.
Code:
QPalette palette; palette.setColor(m_pMenu->backgroundRole(), Qt::black); m_pMenu->setPalette(palette);
Hi,
Thankyou, it is working
:)
Sabeesh
Hi,
One small problem found. When I use the above command, then I can change the background colour of menu bar. But the problem is that, when I add a Table Widet, then its Scrollbar color and Column and Row heading color also change. I need to change only the menubar color of Main Window. How can I do this.
:(
Sabeesh
can you post your code here? how you changing the color of menu?
Hi,
This is the code,
QPalette palette;
palette.setColor(menubar->backgroundRole(), Qt::black);
palette.setColor(menubar->foregroundRole(), Qt::white);
menubar->setPalette(palette);
Sabeesh
Hi,
I have a Table View in my form. I had add some rows into that Table Widget. I need to hide the row heading of that Table Widget. How can i do that. Please help me.
:(
Sabeesh