PDA

View Full Version : how to set stylesheet for two QWidget



phillip_Qt
10th April 2008, 14: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, 15: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, 15: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, 15:22
Ya its working now.:) i did like following

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