KDAB_Tree_Header_Mobile KDAB_Tree_Header_Web

Trusted Software Excellence since 1999

Jesper K. Pedersen

278 results

Have you ever wondered what Q_OBJECT really is? How "public slots" can be valid C++ syntax, what happens when you call emit, and whether signal emission results in the slot being executed asynchronously? Watch this episode to get all those answers.

In this episode, we will show you how to add signals and slots to your own classes. The video includes: Custom Slots, Custom Signals, Compiling with moc.

With Qt's signals & slots mechanism, you can also connect to a lambda expression. In this episode, you will learn how to do that, and equally important, what the pitfalls are when you do that.

Before Qt5 was released, the signal & slots mechanism was somewhat different. This episode will tell you what it looked like back then. There are two purposes to that: (1) You will likely find some references on stack overflow telling you something using that syntax, and (2) it helps enlighten the story about the Qt5 way of doing it.

Qt's signal and slots system is a cornerstone feature enabling object communication throughout Qt applications. This episode introduces the fundamental concepts of signals and slots, demonstrates how to connect signals to slots for event handling and data flow, and covers the different connection methods available for establishing these communication pathways between objects.

One of the most important classes in Qt is without a doubt QWidget, which is at the core of any UI (in the widgets world). QWidget has two purposes: (1) being the super class for any widgets, and thus, providing the API's for mouse, key, and focus handling among a lot of other things, and (2) being a "canvas" where you can lay out other widgets on.

In this video, we will learn what the responsibility of the class QObject is. We will most noticeably look at the parent/child relationship. In this context we will learn what should be allocated using new and what shouldn't.

In this episode, Jesper will show you how to navigate the Qt help text most efficiently. In addition, he will also show how you get to the header files.

In this episode, we will compile the application using both CMake and QMake.

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.

JesperKjaerPedersen

Jesper K. Pedersen

HR Director / COO