Results 1 to 4 of 4

Thread: how to set stylesheet for two QWidget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to set stylesheet for two QWidget

    Quote Originally Posted by phillip_Qt View Post
    ui.m_pLowerStatusBar->setStyleSheet("QWidget#widget {background-color: yellow}; QWidget#widget_2 {background-color: white"); its not workinf fine.
    Isn't there "}" missing?

  2. #2
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to set stylesheet for two QWidget

    Quote Originally Posted by jacek View Post
    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.
    Cheers,
    Phillip



    --- Please post the solution you got to solve your problem. It may help others.

  3. #3
    Join Date
    Oct 2007
    Posts
    201
    Thanks
    19
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how to set stylesheet for two QWidget

    Ya its working now. i did like following

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



    --- Please post the solution you got to solve your problem. It may help others.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.