This video provides answers to the following questions:
Can you call methods on an object shared between threads?
Can you call the same method in different objects?
What about QObject, is it thread-safe?
In the previous episodes, we created and compiled a plugin for Qt designer. The final part missing is to deploy the files in the right directories.This episode discusses the CMake magic that makes that happen.
If you think bool is atomic (and therefore needs no mutex) or if you think volatile is useful in multithreaded programs, you should watch this video. Also, you will learn two different ways to implement asking for a QThread's run() method to finish.
KDSoap 2.0.0 was just released! What is KDSoap? KDSoap is a tool for creating client applications for web services, without the need for any further component such as a dedicated web server. This tool makes it possible to interact with applications which have APIs that can be exported as SOAP objects. The web service then […]
In this fourth episode of our mini series on developing plugins for Qt Designer, we finally implement the classes that make up the plugin.
Making widgets into standalone plugins can be challenging if they weren't carefully designed during development. A solution is restructuring your application into a library plus simple main function using that library. This episode covers everything needed for this architectural transformation to enable proper widget plugin extraction.
(Apologies for the clickbait in the post title! But I'd really like people who are searching for solutions to read this.) Between Qt 5.14 and Qt 5.15, my colleague, Marc Mutz, and I submitted a series of patches to Qt that added "range constructors" to the Qt containers. This brought Qt containers one step closer […]
After a short presentation of a QThread without an event loop, this video will tell you about threads with an event loop. This allows handling events for objects in secondary threads, which is necessary in order to be able to call slots on these objects.The video then presents two different ways to do this: creating both the thread and the worker at the same level, or encapsulating the thread into the worker.
Before you create a plugin, your classes may be configured using constructors like:
class Wishes {
public:
Wishes(bool isExclusive, const QColor& color, QWidget* parent);
...
}
But how do you handle these parameters if your constructors can't take anything but the parent pointer? This episode will discuss a few different possible solutions.
In this video, you will learn about the three ways to create threads in Qt (did you know about QThread::create?). You will also learn how to wait for threads to finish, what can and cannot be done in a secondary thread, and how to properly destruct QObjects used in threads.
In this first episode on developing plugins for Qt Designer, we will discuss the widget promotion feature and its shortcomings compared to plugins.
This is the first video out of 6 on this topic. So, stay tuned!
In the previous blog post of this series, we discussed KDToolBox::QtHasher, a helper class that allows us to use unordered associative containers datatypes which have a qHash() overload but not a std::hash specialization. The majority of Qt value classes indeed are lacking such a specialization, even if they do provide a qHash() overload. For our […]
This talk presents a proven approach for creating fully automated, robust, and maintainable GUI tests for Qt applications on embedded devices. Using an ARM iMX6 device with Qt-based GUI, it demonstrates Squish GUI Tester tool usage and shows how Remote Control and Remote System functionalities enable interaction with target devices in different physical locations.
Qt development for embedded systems involves editing code on desktop and running on embedded devices multiple times daily. Qt Creator and CMake often create problems including installation failures and compiler detection issues. The Boot2Qt SDK solves this by creating CMake toolchain files and Qt Creator configurations for cross-compilation, deployment, and execution out-of-the-box.
This 2021 News from KDAB includes an interview with Harri Porten, CEO, on froglogic’s acquisition by The Qt Company; Qt Embedded Days; Tool of the month: spdlog; Event notices and Resources.
For many developers, QNX is the operating system of choice, when it comes to developing on embedded systems. However, the performance limits are exceeded quickly, especially if you're working on low-end hardware. As a result, you'll likely need to perform an investigation to find the bottlenecks that contribute to reaching these limits, in order to […]
In your code, you will likely find numerous places where you go from an enum to a QString and back. This video shows you the smart way to do it, using Qt's introspection facilities.
Sometimes it's useful to establish a connection between a signal and a slot that should be activated only once. This is not how signal/slot connections normally behave. Remember that, when a connection is established, it will stay active until: the connection is explicitly disconnected; or the sender object is destroyed; or the receiver object is […]
Another day, another blog post about KDToolBox, KDAB's collection of miscellaneous useful C++ classes and stuff. Today, we'll talk about ways to throttle your signal/slots connections -- in other words, how to activate a slot less often than the emission rate of the signal it's connected to. The usual reason why you may want something […]
In this final episode, you will learn about how the templates are moved to specific sections, and I'll also share with you an "install" script that you (and your co-workers) can use to get the templates copied to the right place.