Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
4 December 2024
Qt has a poor man's version of theming your application by changing the color schemes. It is most certainly used in KDE, but besides that I've never really seen it in action. It does, however, have quite some impact on how you do something as simple as changing the background color of a push button. Watch this episode to learn more.
Links:
* KDAB C++ Training Portfolio: https://training.kdab.com/portfolio/modern-cpp/
* QStyle video: https://www.youtube.com/watch?v=Qn4HHbDxG0M
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Programming-With-Qt-Widgets
00:00 Intro
00:25 Get involved in KDE!
00:52 Color themes was born
01:55 Advertise - C++ training
02:26 QPalette and color groups
04:00 Night mode using palettes
04:58 How to change the palette
06:15 The color roles
09:20 What's up next?
All 'Introduction to Qt Widgets - Module 1' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hgf7zCKF2Rv9Y0WoN8RVGf
All 'Introduction to Qt Widgets - Module 2' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6j_c41CFMprvg9EiWz0WdSy
All 'Introduction to Qt Widgets - Module 3' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6hWZO_viEf1rfjgk4E6SCKd
All 'Introduction to Qt Widgets - Module 4' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6iXUNQMb2GkEjV_oK6Xid9-
All 'Introduction to Qt Widgets - Module 5' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6h1tsLAETdrrFlsVMeYpiHI
All 'Introduction to Qt Widgets - Module 6' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6jIsRYriqN70V83t_mdDZHT