PDA

View Full Version : how to set stylesheet for two QWidget



phillip_Qt
10th April 2008, 13:43
Hi all
I ve a problen. i need help.
if ill write like
ui.m_pLowerStatusBar->setStyleSheet("QWidget#widget {background-color: yellow}; QWidget#widget_2 {background-color: white"); its not workinf fine.

if iwill write like
ui.m_pLowerStatusBar->setStyleSheet("QWidget#widget {background-color: yellow}");
ui.m_pLowerStatusBar->setStyleSheet("QWidget#widget_2 {background-color: white");
its also not working fine.
Can any body tell me how to fill the back ground of both widget at a time

jacek
10th April 2008, 14:10
ui.m_pLowerStatusBar->setStyleSheet("QWidget#widget {background-color: yellow}; QWidget#widget_2 {background-color: white"); its not workinf fine.
Isn't there "}" missing?

phillip_Qt
10th April 2008, 14:19
Isn't there "}" missing?

That i ve corrected
ui.m_pLowerStatusBar->setStyleSheet("QWidget#widget {background-color: yellow}; QWidget#widget_2 {background-color: white}");
but color is not getting changed.:(

phillip_Qt
10th April 2008, 14:22
Ya its working now.:) i did like following

ui.m_pLowerStatusBar->setStyleSheet("QWidget#widget {background-color: yellow} QWidget#widget_2 {background-color: white}");