KDAB_Tree_Header_Mobile KDAB_Tree_Header_Web

Trusted Software Excellence since 1999

Jesper K. Pedersen

269 results

This first episode introduces Qt Widgets development with a "Hello World" example and covers foundational concepts. Jesper demonstrates the basic Qt Widgets application structure, explains the event loop mechanism that drives Qt applications, discusses the QApplication class and its role in managing the application lifecycle, and shows how to run the program.

Adding sort_by to KDAlgorithms required implementing std::invoke for C++14 compatibility. This video provides insights into the implementation process, covering advanced C++ concepts including SFINAE and tag dispatching for template metaprogramming, if constexpr for conditional compilation, parameter packs for variadic templates, and static_assert for compile-time validation.

QLineEdit and QTextEdit have setReadOnly() methods, but QComboBox doesn't. Making widgets read-only without truly disabling them (which prevents interactions like tab switching or scrolling) requires alternative approaches. This video explores solutions for making QComboBox and other widgets without setReadOnly() methods effectively read-only while maintaining their interactive capabilities.

This first episode of the "Show me your IDE" mini-series features Jesper talking with CLion user Alexander Busse about his top 4 features and Qt integration. Key topics include CLion's inline annotations, the "everything runner" functionality, powerful refactoring capabilities, seamless CMake integration, Git workflow features, Qt Widgets support, Qt Designer integration, and keyboard-friendly interface design for efficient development workflow.

Jesper Pedersen gives a comprehensive introduction to the 5 KDAB special one day training courses offered in November 2023 in conjunction with Qt World Summit.

In this episode, I'll show how to place a burger button in the topmost corner of an application - that is on top (z-order) of other widgets.

In this video, Jesper walks through compiling Qt Creator, setting up Git Copilot and configuring it for yourself.

In this episode, I'll polish the custom context menu adapter code from last week to get rid of the unique_ptr's - I got inspired for that, from reading about type erasure.

In this episode, for an application with a lot of QTableViews and QTreeViews (many with context menus), Jesper presents a solution where he does not need to add a new subclass each time he wants to set up a custom context menu. Further, a problem with the syntax, where lots of std::unique_ptrs got in the way, is discussed.

Watch this episode to understand how, what you are otherwise doing on your gui thread, can affect accuracy in ways you may not wish for when using QTimers.

Here, Giuseppe D'Angelo answers Jesper’s query about never using exception handling in Qt in a surprising way. Watch this video to learn what you can do and what you shouldn't do.

In this episode, Jesper interviews Peppe on a helper class called propogate_const, which also makes the pointed-to object const in const methods.

Generally, you need Qt 6.4 to use Qt's Structural Bindings feature, which iterates the values of a Map or QHash elegantly. This episode shows how you to enable it for older Qt versions too.

In this episode I'll show how to work with git sub-modules, and especially how to cope with changes coming in from sub-modules. I'll also discuss the issues of switching branches or doing a git bisect when your project contains sub-modules.

When using external git projects in your codebase, copying code is simplest but makes updates difficult. A better alternative is git submodules. This episode demonstrates creating submodules using the kdalgorithms GitHub module and shares tricks for easier submodule management in CMake projects.

This episode builds on the previous three to understand complex template code - a modified transform function that takes containers instead of iterators and returns transformed containers. The key feature is smart container reuse: when result and input containers are the same type and input is an r-value, it reuses the input container rather than creating new ones.

Template code commonly uses type traits to test type properties: is it an l-value, is it const, does it have a method, etc. This episode investigates how type traits are implemented by creating our own versions of is_same_v, is_const_v, and integral_constant, building foundational knowledge for understanding complex template code like type comparisons and r-value detection.

This video shows how to "overload" templates with two real-world examples: a sort function with general implementation plus char specialization, and a vector implementation with boolean specialization for space efficiency. Finally, we'll see how to make C++ reveal what type a template parameter represents.

In this episode we will start slowly understanding what a template is, but within 15 minutes we will have seen the assembly code generated, have discussed template type parameters and non-type parameters, and finally have discussed template template parameters (no that is not a mistake that it says template twice!)

JesperKjaerPedersen

Jesper K. Pedersen

HR Director / COO