The Viking Blog

Read our blog for inspiration from Viking Software’s expert insights.

I have a small mobile app that I work on from time to time. It is OSS and using Qt.

Especially in larger SW projects, consistency is a very important factor. And one main area of consistency is the code style.

Qt Widgets

Creating custom widget is not a hard problem, but there are a few things you should consider. Here I present a simple list of what you should at least consider doing

QWidget

An example of pixel based painting.

A Good QML file

What makes a QML file (often called component) a well written good quality one?

QtQuick

When you want to draw a custom item in QtQuick, then you essentially have 3 options: QQuickItem, QQuickPaintedItem or the QtQuick Canvas item.

Keyboard navigation

Description of Qt’s event system and the details that you should know for providing your UI with a good keyboard navigation system.

QThread

There are basically two different ways of using QThread directly: Worker threads or subclassing.

SerializingCode

Writing a save and load mechanism can be done using QObject introspection/reflection.