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 March 2024
In this and the next three episodes, we will look at the most common widgets in Qt, their API, how you are supposed to work with them, and most noticeable some of the hidden gems.
We start out by looking at QLabel, QLineEdit and QTextEdit.
If you think, "Too basic for me", then see if you know the answers to these questions:
- How do to show an image on the screen?
- How do you prevent other people from seeing the password your user is typing in?
- How do you get your hands on the text selected in a QTextEdit?
- Will QTextEdit perform well if you add say 100 new lines to it every second?
In this episode, Jesper will answer those and many other questions.
00:00 Introduction
00:38 Roadmap
03:17 QLabel
06:47 QLineEdit & QTextEdit
All 'Introduction to Qt Widgets' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6iFcTyItvnE5nOmJR8qk_7o
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
Links:
* KDAB Mentoring and Support Services: https://www.kdab.com/services/software-consulting/
* Documentation about QLineEdit inputMask: https://doc.qt.io/qt-6/qlineedit.html#inputMask-prop
* Documentation about QLineEdit setValidator: https://doc.qt.io/qt-6/qlineedit.html#setValidator
* Documentation about QtTextBrowser Class: https://doc.qt.io/qt-6/qtextbrowser.html
* Documentation about QPlainTextEdit Class: https://doc.qt.io/qt-6/qplaintextedit.html
* Documentation about QTextEdit Class: https://doc.qt.io/qt-6/qtextedit.html
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Programming-With-Qt-Widgets