Cross-platform software libraries and APIs
Qt Creator IDE and productivity tools
UI Design tool for UI composition
for Qt projects
Digital advertising for UI apps
Usage intelligence for embedded devices
GUI test automation
Code coverage analysis
Test results management and analysis
Software static code analysis
Software architecture verification
The latest version of Qt.
Make the most of Qt tools, with options for commercial licensing, subscriptions, or open-source.
Explore Qt features, the Framework essentials, modules, tools & add-ons.
The project offers PySide6 - the official Python bindings that enhance Python applications.
Qt empowers productivity across the entire product development lifecycle, from UI design and software development to quality assurance and deployment. Find the solution that best suits your needs.
Insight into the evolution and importance of user-centric trends and strategies.
Learn how to shorten development times, improve user experience, and deploy anywhere.
Tips on efficient development, software architecture, and boosting team happiness.
Get the latest resources, check out upcoming events, and see who’s innovating with Qt.
A wealth of Qt knowledge at your fingertips—discover your ideal learning resource or engage with the community.
Whether you're a beginner or a seasoned Qt pro, we have all the help and support you need to succeed.
August 14, 2017 by Maurice Kalinowski | Comments
Recently, we talked about how we're broadening our offering towards the automation sector. In case you missed it, you can find all relevant information here as well as read our blog post here.
One of the biggest challenges in starting an automation project is to build a suitable communication stack. MQTT has received more and more popularity over the last years for managing telemetry data (i.e. collecting data from sensors, health status of devices etc.). This is why we are now extending our portfolio to further help and simplify the development workflow.
MQTT describes itself as follows:
"It was designed as an extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote locations where a small code footprint is required and/or network bandwidth is at a premium."
Using a publisher-subscriber methodology puts the routing responsibility towards the server (or in this context called "message broker"), which all clients connect to. Multiple levels of service quality can be specified to guarantee message delivery.
The connection itself usually builds on top of a TCP connection. However, it can use any ordered, lossless and bi-directional communication method.
QtMqtt is a client implementation, which can be used for creating devices to send, but also to monitor solutions for receiving and managing data. QtMqtt does not focus on the broker side.
One important item to mention is that we aim to have QtMqtt fully specification compliant compared to other solutions. This implies support for
Let 's dig a bit deeper and discuss how you actually use QtMqtt in your project.
Publishing data:
QMqttClient publisher;
publisher.setHostname(“some.brokerlocation.com”);
publisher.setPort(1883);
publisher.connectToHost();
…
publisher.publish(“sensor_1/dataset/foo”, “values”, qosLevel);
Receiving data:QMqttClient subscriber;
subscriber.setHostname(“some.brokerlocation.com”);
subscriber.setPort(1883);
subscriber.connectToHost();
. . .
QSharedPointer<QMqttSubscription> sub = subscriber.subscribe(“sensor_1/#”, qosLevel);
connect(sub.data(), &QMqttSubscription::messageReceived, [&](QMqttMessage msg) {
qDebug() << “New Message:” << msg.payload();
});
It is crucial for any automation solution today to make sure that all communication is secure and safe. QtMqtt provides two means to achieve this:
For the latter case, we can utilize QSslSocket as provided by Qt Network. As a convenience, QMqttClient has another member called connectToHostEncrypted() which behaves similar to QSslSocket's argument list.
While MQTT is mostly used via TCP, it isn't hardwired to it. QtMqtt allows you to specify additional transport methods, which are based on either QIODevice or QAbstractSocket. This implies that you can create your own transport and pass it over to QMqttClient before establishing a connection.
One concrete example is to use MQTT over websockets, for which Qt provides a separate module. QWebsocket is not based on QAbstractSocket due to different means of sending and receiving data. However, the specification is very clear on how MQTT data has to be pushed via websocket (send as binary data, must fit one datagram, etc.). Hence, a convenience class can be implemented. The specific showcase can be found in the examples of the QtMqtt module.
If you found this post interesting, feel free to get in touch with us and get access to a prerelease version.
Download the latest release here: www.qt.io/download.
Qt 6.6. is a feature release with focus on improving UX capabilities including responsive UI technology and the Qt Graph module.
Check out all our open positions here and follow us on Instagram to see what it's like to be #QtPeople.
Mar 15, 2024
Qt 6.7 introduces convenience improvements for implementing typical..
Mar 14, 2024
We are happy to announce the release of Qt Creator 13 RC! For more details..
Mar 13, 2024
A new version of Qt for MCUs is available, bringing new features to the Qt..
Qt Group includes The Qt Company Oy and its global subsidiaries and affiliates.