Jesper K. Pedersen
269 results
This episode introduces "git switch" and "git restore" -- two commands, which means that, in most cases, you do not need "git checkout" anymore.
Do you remember to add qAsConst around Qt containers when iterating? Without it, containers risk detaching just before iteration starts. This episode explains what qAsConst does, why and when it's needed, and how to handle iterating containers returned from function calls.
Jesper explores the smoothest way to implement operator<() for custom classes, journeying through std::tie() and std::tuple(), ending with a discussion on QString comparison considering human interpretation.
Your compiler likely parses nearly 100,000 lines of code for a simple Qt "Hello World!" program. This episode shows how to see exactly what code is given to the compiler for each source file you compile.
Using integers and strings for user IDs, project IDs, and names risks confusion between different types, with compilers unable to catch these errors. This episode shows a wrapper class to make these types unique and discusses Qt integration.
Developers with Java or C++98 backgrounds often default to subclassing when facing problems. Modern C++ offers many different solutions, and this episode demonstrates when subclassing isn't the right approach.
Designing API's is hard work with lots of traps. Even worse is the situation when you later maintain the code and just need a function to behave slightly different in different situations.
Complex applications display lots of information, making it difficult to find layouts that work for every user. KDDockWidgets provides flexibility by letting users reorganize, save, and restore their custom layouts to meet different needs.
In Qt Creator, there is a line edit which has a push button embedded in it for selecting tokens. How did they do that? In this episode, I'll investigate and implement a file chooser based on this idea.
Whether you've just finished watching our 54 "Introduction to Qt/QML" videos or you are just looking for QML tips and tricks, here are 35 more videos that can help you save time and increase your productivity. So check out our Qt Creator tips, our git tips, and much more!
Qt DevCon was a conference for the Qt developer community and focused exclusively on developer topics. It took place place in Berlin, Germany from 14th to 15th June 2022.
Back in August 2021, there was an impressive demonstration of an artificial intelligence able to code web pages and python code. In this video, Jesper demonstrates the KDAB release of Qt Creator with Open AI Codex built in, and show how far you can actually get with it.
Whether you're new to unit testing or already write tests, this episode shows how to set up Qt's testing framework and maximize Qt Creator's testing features. Covers Qt's framework versus others, test cases with QCOMPARE, table-driven testing, Qt Creator integration, debugging tests, and CMake integration.
Unless you've never used QTableView, you've likely struggled with column sizing: avoiding blank space, stretching specific columns, fitting content, allowing resizing, avoiding scrollbars, or preventing excessive vertical space. This example demonstrates solutions to all these common problems.
Building Qt isn't that hard, and doing so helps you with more accurate position information when you debug your way in to Qt itself. In this video I'll show you the steps required to do so.
When writing Qt ModelView models, should you check indexes in methods like rowCount? While Qt itself won't give you invalid indexes, you or coworkers might write broken proxies or interact incorrectly with models. This video presents macros to help validate indexes before using them.
QMessageBox is missing a critical feature (IMHO): a "do not show again" button that makes Qt record my preference, so it doesn't ask me for my preference over and over again. In this episode, I'll implement a drop-in replacement that has this feature.
Git supports running local scripts at different times, including during commits or pushes. This episode discusses useful hooks including preventing commits with FIXME's, ensuring use of specific classes like KDVTableView instead of QTableView, and avoiding QDate::currentDate which breaks unit tests.
There are a million different ways you can use git. Sometimes it's useful to look someone else over the shoulder and see how they do it. In this video I'll show you my workflow.
Let's look at some useful techniques involving qDebug, among others: Making qDebug() included by default, supporting your own types, and sectioned debugging.