Skip to content

QtDevelopment Get the RSS Feed

for feeds to planetqt and planetkde

Writing a Custom Qt 3D Aspect – part 2 Setting up the backend and communications

Introduction

In the previous article we gave an overview of the process for creating a custom aspect and showed how to create (most of) the front end functionality. In this article we shall continue building our custom aspect by implementing the corresponding backend types, registering the types and setting up communication from the frontend to the backend objects. This will get us most of the way there. The next article will wrap up by showing how to implement jobs to …

Writing a Custom Qt 3D Aspect – part 1 Extending Qt 3D via Aspects

Introduction

Qt 3D has a flexible and extensible architecture that allows us to easily add our own new functionality to it without disrupting the existing features. The functionality of Qt 3D is divided among so-called aspects, each of which encapsulates a particular subject domain such as rendering, input, or animation.

This short series of articles will walk you through the process of adding a new aspect that provides component types and behaviour for a new domain not covered by Qt …

KDAB talks at Qt World Summit expert insights across the stack, Oct 11-12

On Wednesday, October 11th

13:30

QtStringViews, QtStringViews everywhere, by Marc Mutz

  • on the use and emerging patterns in QtStringview.

13:55

What’s New in Qt 3D? by Sean Harmer

  • describing all the new features in Qt 3D 5.8/5.9 and what’s in development for Qt 3D 5.10 and beyond.

QML-driven HMI Architectures for Rolling Embedded Devices by Christopher Sterz

  • revealing best practices for avoiding complexity in QML Car HMIs.

14:30

Multithreading with Qt, by Giuseppe D’Angelo

  • outlining the foundations of

clazy 1.2 released presenting 5 new Qt compile-time checks

In the previous episode we presented how to uncover 32 Qt best practices at compile time with clazy. Today it’s time to show 5 more and other new goodies present in the freshly released clazy v1.2.

New checks

1. connect-not-normalized

Warns when the content of SIGNAL(), SLOT(), Q_ARG() and Q_RETURN_ARG() is not normalized. Using normalized signatures allows to avoid unneeded memory allocations.

Example:

    // warning: Signature is not normalized. Use void mySlot(int) instead of void mySlot(const int) 

New in Qt 5.10: recursive filtering for QSortFilterProxyModel

When using Qt’s model/view framework, filtering has always been very easy with QSortFilterProxyModel. To filter a list using text typed by the user in a line-edit, you have certainly been applying the standard recipe:

  1. instantiate the proxy;
  2. insert it between view and source model;
  3. connect the lineedit’s textChanged signal to the proxy’s setFilterFixedString slot; done!

But what if the model is a tree rather than a flat list?

Let’s use the tree below as an example. As you can …

Un-deprecate your Qt project

The last post from my colleague Marc Mutz about deprecating Q_FOREACH caused quite an uproar amongst the Qt developers who follow this blog.

I personally feel that this was caused fundamentally by a perceived threat: there is a cost associated to porting away a codebase from a well-known construct (Q_FOREACH) to a new and yet-undiscovered construct (C++11’s range based for), especially when the advantages are not that clear. (With stronger advantages, maybe people would be more keen …

Writing Code That Won’t Kill A Functional Safety Source Book

Functional Safety is the term used for systems designed to minimize risk to human health. But there’s a dilemma in today’s tech-driven world.

We are more reliant than ever on software to control our planes, trains, cars, and boats, to operate our medical equipment, to process our food, to clean our water, and to power our homes. If these systems don’t function properly, they have the ability to injure, or even kill us. Meanwhile software complexity continues to increase exponentially …

Fixing bugs via lateral thinking

For today’s blog I would like to share with you the little adventure I had when fixing a very strange bug in Qt.

Pop quiz

Don’t think about this too much, just guess: what does this QML snippet print?

import QtQuick 2.0

QtObject {
    Component.onCompleted: {
        console.log("240000000000" == "3776798720");
    }
}

There are no JavaScript semantic tricks involved; and using either == or === does not change the result in any way.

Did you get it?

Pop quiz (2)

Here’s …

Fuzzing Qt for fun and profit A brief introduction to fuzzing and how we successfully use it in Qt

Many KDAB engineers are part of the Qt Security Team. The purpose of this team is to get notified of security-related issues, and then decide the best course of action for the Qt project.

Most of the time, this implies identifying the problem, creating and submitting a patch through the usual Qt contribution process, waiting for it to be merged in all the relevant branches, and then releasing a notice to the users about the extent of the …

By continuing to use the site, you agree to the use of cookies. More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close