Better_Software_Header_Mobile Better_Software_Header_Web

Find what you need - explore useful information and developer resources

Areas of Interest

Searching…

645 results

CXX-Qt is KDAB's extension to CXX, which adds Qt features like properties, signals and slots to CXX. In this step-by-step tutorial, we implement a QAbstractItemModel subclass, which is key to exposing structured data to QML.

The main goal of the Cyber Resilience Act (CRA) is to improve cybersecurity in the EU by establishing strict standards for digital products and software. It primarily aims to prevent cyber threats that could endanger essential infrastructure, businesses, and the digital economy. In this video Matthias Kalle Dalheimer, President and CEO of KDAB, shares his view on the CRA and its effect on open source software. This is Part 1 of two videos on the subject.

CXX-Qt is KDAB's extension to CXX, which adds Qt features like properties, signals and slots to CXX. In this step-by-step tutorial, we extend our "Hello World!" application from the last video with a very basic Qt GUI.

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.

CXX is an opinionated library that allows mixing C++ and Rust in a safe and idiomatic way. In this step-by-step tutorial, we implement an example application that uses CXX to bridge between C++ and Rust. In the following videos, we will expand on this knowledge to add Qt to the mix with CXX-Qt.

In the last months, governments around the world have put a focus on memory safe programming languages. For C++ projects, Rust has often been suggested as the natural choice to port to.

When you press Ctrl+k and type a class name, you are asked which version of Qt you want to see that documentation for. 99% of the time, the answer is likely "The latest". You can actually make it show the latest by default, but it is well hidden.

One of the standard communication protocols for web services is SOAP, which is basically XML over HTTP. I wrote an opensource library called KDSoap which makes it easy to do SOAP with Qt (both client-side and server-side). In this video you will see how, starting from a web service which provides a WSDL file to describe its API, KDSoap can generate code to make synchronous or asynchronous calls to the web service.

A very common communication protocol is REST, which is simply JSON over HTTP. Qt has all the building blocks for this, with QJsonDocument for JSON and QNetworkAccessManager for HTTP. In this video, you will see a real-world library that makes REST requests to a web service called TMDB (movie database), as an example.

This video shows an alternative way to a DBus client using Qt, using the convenience of blocking calls but without blocking the GUI thread: all blocking calls are done in a separate thread.

This video shows how to implement a DBus client using Qt, using generated code so that calls and their signature are checked at compile time. Special care is taken not to block the GUI thread, using asynchronous handling only (via signals and slots, and a queue of pending requests)

This video shows how to implement a DBus server using Qt, in order to communicate between two processes. The benefits of using DBus include the fact that it's a standard communication protocol on Unix systems especially, and the ability for Qt to generate classes the client can use to make calls in a type-safe way. For now we'll test the server using the qdbus command-line client, the next video will show how to make calls from C++.

In this video, you will see an alternative to the asynchronous handling done in the previous video. If the socket is managed by a separate thread, it becomes possible to implement the protocol in a synchronous manner, which is much easier.

In this video, you will learn about a common programming pattern called the job pattern, useful for asynchronous operations (for instance, driven by the Qt event loop) such as socket communication, or any other operation that emits signals upon progress and completion.

In this video, you will learn how to use the JSON classes in Qt (5 or later) to implement a communication protocol between two processes. Special care is taken not to block the GUI thread in the graphical client application, using asynchronous handling only (via signals and slots, and a queue of pending requests).

In this video, you will learn how use Qt (5 or later) to develop a server and a client application which communicate using a local socket. You will learn how to handle the various issues that arise from systems made of multiple processes. For instance, what if the client tries to connect before the server is running? What if the server is restarted? What if the server crashes? What if the server is started twice?

This video shows an application that makes synchronous (blocking) and asynchronous (non-blocking) calls from the main thread of a graphical Qt application, and how this affects the user experience.

This video introduces the series, defines the types of inter-process communication and the technical alternatives that will be presented, and advises on what are the things you should know or learn before watching this video series.

Qt has a property system that is used from many places, including Qt Designer, QML, and other language bindings. It can, however, also be very useful on its own, as in the example I show towards the end of this episode. Watch this episode to get a better understanding of how it all fits together.

The class QVariant is a truly important class in Qt, which offers the possibility to provide anything to a function, or return anything from one. If you know modern C++, then it is a bit like std::any, and if you are more familiar with plain C, then you will find some resemblances to its union.