Quote Originally Posted by phillip_Qt View Post
Hi.
I ve same problem like u. Can u plz tell me how to set default style sheet?
I tried like setStyleSheet(QString(""));
But its not working. My code is as follows

Qt Code:
  1. void NightColor()
  2. {
  3. ptr->LoadStyleSheet("Night");
  4.  
  5. }
  6. void DayColor()
  7. {
  8. setStyleSheet(QString(""));
  9.  
  10. }
  11.  
  12. void Toggle()
  13. {
  14. if(m_iFlag == 0)
  15. NightColor();
  16. else
  17. DayColor();
  18. }
To copy to clipboard, switch view to plain text mode 

I ve a push button. if i press it 1st time Nightcolor() ll b called. But if i ll press nxt time default style sheet shd be activated. but its not activating.
From the look of your code, You are setting a empty style sheet on the global object and not on your "ptr" object. Since the ptr object now has a style, it takes precidence over a global style. To set that object back to "default" use ptr->setStyleSheet("");