Qt_GUI_BG_7_1 - 8BitsCoding/RobotMentor GitHub Wiki

Style Sheets

  • Qt Style Sheets are a powerful mechanishm that allow you to customize the appearance of widgets,
  • in addition to what is already possible by subclassing QStyle.

Example

QLineEdit {background: yellow}

  • Style sheets consist of a sequence of style rules.

  • A style rule is made up of a selector and a declaration.

  • Style sheets can be set at the

    • Application level
    • Parent(Container) widget level
    • Edge widget level
  • They are loaded at run time.