Styling Qt Applications
summary
Explains how Qt painting delegates drawing via QStyleOption, how styles inherit CommonStyle and why a proxy style often has to duplicate QCommonStyle code to hook subcontrols, and how styles expose palette, RTL layout and dynamic properties. Demonstrates stylesheet syntax, selectors, box model, gradient and border-image tricks and warns to set foreground when changing backgrounds. Shows a benchmark claim: Qt 4.4 → Qt 4.5: 2fps → 5fps when repeatedly switching styles, with stylesheet-only repainting reaching about 12fps.
AI-written summary · about
chapters (11)
- 0:00Introduction to styling
- 1:10Why create custom styles
- 4:05How painting works in Qt
- 6:12Creating custom Q styles
- 12:44Colors and palettes in Qt
- 17:36Introduction to style sheets
- 23:02Demo of style sheets in Qt Designer
- 31:38Qt style sheet box model
- 38:50Style sheet specificity and rules
- 43:13Dynamic properties in style sheets
- 45:11New in Qt 4.5 style sheets
