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
2 December 2024
In this module, we will talk about painting your own widgets, and we will see a number of techniques and classes involved in this. We will start with this episode where we discuss the very simplest way to get some pixels on the screen.
Links:
* Difference between update and repaint: https://youtu.be/jCNxm1drQ8w?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
* KDAB C++ Training Portfolio: https://training.kdab.com/portfolio/modern-cpp/
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Programming-With-Qt-Widgets
0:00 Intro
00:28 A travel back to 1993 - how would you implement painting?
02:10 Back in 2024 - QPainter / QPaintDevice etc.
04:16 An example of Painting
06:15 Double buffering
07:42 Widgets are transparents
08:06 Advertise
08:27 The painting application explained
11:09 Anti-aliased painting
14:19 QSize, QPoint, QLine, QRect
17:17 Whats 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