Qt supports styling in using the QStyle
class and Qt Style Sheets. QStyle
is the base class for all styles in Qt, and it encapsulates the styling of the Qt user interfaces. Covering the QStyle
class is out of the scope of this book, but it should still be noted that creating a sub-class of QStyle
and implementing different styling capabilities in it is ultimately the most powerful method of changing the look and feel of a Qt application. However, Qt also offers Style Sheets to style applications. Qt Style Sheets are almost identical in syntax to HTML CSS (Cascading Style Sheets), which is an inseparable part of styling in web pages.
Note
CSS is a styling language that can be used to define the way objects on a user interface look. In general, using CSS files helps separate the styling of web pages from the underlying implementation. Qt uses a very similar method in its Style Sheets to describe the way widgets look. If you are familiar with CSS files, then Qt Style Sheets...