David Faure
55 results
Dropping Files onto Widgets
7 October 2025
Building Better Desktop Applications
11 September 2025
Building efficient desktop applications requires strategies that address common development bottlenecks. From reducing compilation times with precompiled headers, caching, and distributed builds, to mastering multithreading with sanitizers and safe structures, designing extensible plug-in systems, simplifying configuration via text-based files, and leveraging shared libraries for modularity - these best practices streamline development while boosting performance and maintainability.
This post explores implementing drag-and-drop onto existing items in Qt, such as moving emails between folders. It covers both Model/View and Item Widget approaches, detailing key setup steps and improvements made to Qt along the way.
In this follow-up to our drag-and-drop guide, we explore how to move items between views in Qt’s model/view framework. Learn how to set up both drag and drop sides, handle MIME data, and implement key model methods. Whether you're working with model/view separation or with item widgets, this post provides practical examples to help you customize UI interactions effectively.
This blog post is the first in a series on implementing drag-and-drop in the Qt model/view framework. It covers how to reorder items within a single view, whether you're using QListView, QTableView, or QTreeView with a custom model, or QListWidget, QTableWidget, or QTreeWidget with items. The post includes code examples, checklists, and insights into improvements made in Qt 6.8 for smoother drag-and-drop functionality.
Setting C++ Defines with CMake
14 November 2024
To build parts of the code optionally, or to inject CMake variables into C++, you need pre-processor definitions like -DENABLE_FEATURE on the command-line or #define ENABLE_FEATURE 1 in code. This video shows 3 different ways of setting such pre-processor definitions with CMake. In addition, the video explains how and why you should use #if rather than #ifdef for on/off defines.
The goal When building C++ code with CMake, it is very common to want to set some pre-processor defines in the CMake code. For instance, we might want to set the project's version number in a single place, in CMake code like this: This sets the CMake variable PROJECT_VERSION to 1.5, which we can then […]
Following these desktop software development best practices ensures a flexible design. This is crucial to the success of desktop applications.
The Job Pattern
12 September 2024
Six Tips for Maximizing Desktop Screen Potential
29 August 2024
Desktop software has many differences from mobile and embedded applications but one of the biggest and most obvious is the screen. How can you take advantage of all that real estate for your application? Six considerations for managing the screen in your desktop application Choosing the right GUI framework Use a flexible GUI framework that […]
Mastering Cross-platform Desktop Apps
15 August 2024
Creating applications for cross-platform compatibility is a modern best practice. It increases deployment flexibility and allows applications to reach a wider audience. However, doing it properly can involve some trial and error. At KDAB, we’ve built many multiplatform desktop applications. Here, we’ve compiled a few insights from that process to help you build better software. […]
Replaying the Drawing of a Qt Widget Step by Step
13 September 2023
Finding the Code Triggered by a QAction
6 September 2023
Identifying a Qt Context Menu with GammaRay
30 August 2023
Debugging Qt Widget Sizing Issues with GammaRay
23 August 2023
In this video, you will learn how to use GammaRay to investigate the issue of a widget that can be squeezed down far too much horizontally. After testing the fix by changing a property dynamically at runtime, you will see how to find the corresponding line of C++ code in order to fix the bug for good.
Investigating & Fixing a Double Margin
16 August 2023
In this video, you will learn how to use GammaRay to identify the widget responsible for a double margin issue, a frequent cause for misaligned widgets. After testing the removal of the margin in Gammaray, you will see how to make your IDE jump to the line of code that creates the widget, in order to find the corresponding layout and fix the bug there.
Identifying Widgets
9 August 2023
Introduction to GammaRay Tutorials
3 August 2023
Custom Qt Widgets: Implementing a Toggle Switch
25 April 2023
Using Qt Stylesheets for Qt Widgets Styling
20 April 2023


