Results 1 to 2 of 2

Thread: Using QStyle and StyleSheet

  1. #1
    Join Date
    Feb 2007
    Posts
    4
    Thanks
    3

    Default Using QStyle and StyleSheet

    Hi everyone,

    i have style problems with my scrollbars of a Table or ListWidget. I'm using my own QStyle, that works. But when i set my stylesheet to a widget, the customized scrollbars go away.

    Example:

    1. take the styles example
    2. goto to widgetgallery.cpp:165 and add
    Qt Code:
    1. tableWidget->setStyleSheet("QTableWidget { background-color: green; } ");
    To copy to clipboard, switch view to plain text mode 

    See the difference of the Scrollbar of the QTableWidget

    Can someone knows the problem?

    thx Fil

  2. #2
    Join Date
    Feb 2007
    Posts
    73
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Using QStyle and StyleSheet

    I have seen a similar problem with combo boxes. When I use a style sheet to apply colors to the menu, the plastique style (default) puts check boxes in the selected item. So I could use help with this as well.

    How do we retain styles, while using the style sheet to apply attributes to the current style?

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.