try same code as main window.
change m_pMenu with your menu variable.
Qt Code:
QPalette palette; palette.setColor(m_pMenu->backgroundRole(), Qt::black); m_pMenu->setPalette(palette);To copy to clipboard, switch view to plain text mode
try same code as main window.
change m_pMenu with your menu variable.
Qt Code:
QPalette palette; palette.setColor(m_pMenu->backgroundRole(), Qt::black); m_pMenu->setPalette(palette);To copy to clipboard, switch view to plain text mode
Rajesh Kumar Singh
Bangalore, India.
Qt Search
Must Watch:
See how we can connect digital world objects to our day to day life….
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?
Rajesh Kumar Singh
Bangalore, India.
Qt Search
Must Watch:
See how we can connect digital world objects to our day to day life….
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
Bookmarks