O'Reilly logo

Qt 5 Projects by Marco Piccolino

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Styling the UI

The UI that we created sports a very standard and OS-specific look. We and our customers might be content with that, or maybe not.

Qt Widgets offer a few different options to implement custom styling of an application's look & feel.

The default option is to use a subclass of QStyle (http://doc.qt.io/qt-5.9/qstyle.html). Qt itself provides many of these subclasses to implement native-looking widgets. The style of an entire application can be set explicitly and programmatically via  QApplication::setStyle(). Styles can also be set for individual widgets with the  QWidget::setStyle() method. When no style is selected explicitly, Qt applies a default style, which is generally dependent on the target OS platform. Existing styles ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required