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
8 January 2025
In this episode we will see how to set up CMake for translating your Qt application.
The sound in this video is subpar because the intended microphone wasn’t used accidentally.
Chapters:
00:00 Introduction
00:32 Highlight of the previous episode
01:48 The CMake functions to use
04:20 qt_add_translations
06:07 the minimal CMakeLists.txt file
06:59 A few catches
09:26 Advertise: GammaRay
09:51 Translation of Qt itself
13:17 Putting it all together
14:13 Setting the language from Qt Creator
15:40 Running update_translations manually
17:02 Links to other videos
Links:
- Query Qt for it's paths: https://invent.kde.org/frameworks/extra-cmake-modules/-/blob/master/modules/ECMQueryQt.cmake
cmake-project from KDToolBpx: https://github.com/KDABLabs/KDToolBox/tree/master/qt/cmake-project
- GammaRay: https://www.kdab.com/software-technologies/developer-tools/gammaray/
Video resources:
- Introduction to Qt Widgets playlist: https://youtu.be/BIES4pOVtz8?list=PL6CJYn40gN6iFcTyItvnE5nOmJR8qk_7o
- Qt Widgets and More playlist: https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Programming-With-Qt-Widgets/internationalization
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
All 'Introduction to Qt Widgets - Module 7' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hHyqD9ZxUqpd14LoHvadN7
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more