Your browser is no longer supported. Please upgrade your browser to improve your experience.

Qt is a widget toolkit primarily used for creating graphical user interfaces (GUIs) and cross-platform applications. These applications can run seamlessly on various software and hardware platforms such as Windows, macOS, Android, and Linux, often requiring little or no change in the underlying codebase.

However, for all its strengths, Qt is not universally beloved. In this two-part blog, we take a look at the high-level business reasons that make it valuable to our clients, as well as the reasons that software developers might not be so keen.

In this first part, Bluefruit founder Paul Massey explains the benefits of Qt from the business side.

In this blog:

Cross-platform uniformity

Portability

Tooling for testing

Getting everyone on the same page

Cross-platform uniformity

In the past, user interfaces (UIs) were coded entirely from scratch. However, as user expectations shifted towards visually appealing interfaces, frameworks like Qt gained popularity. Originally designed to simplify GUI development, Qt has grown beyond its roots but remains the framework of choice for creating rich user experiences.

It provides a vast library of pre-built widgets and elements like buttons, text boxes, menus, and so on, allowing developers to quickly assemble UIs.

Some hardware manufacturers have seen an opportunity here, providing their own graphical frameworks, specifically optimised for resource-constrained environments such as microcontrollers. However, customers using such proprietary frameworks may find themselves “tied in” to that manufacturer if they wish to maintain consistency across their range of devices.

It’s not unheard of for companies to suddenly realise that most of their products are dependent on a single external supplier—a significant business risk.

Qt, by contrast, is open-source (or, at least, partially), cross-platform compatible, and supported by major hardware manufacturers, including STM and Texas Instruments.

This allows device manufacturers to create the GUI they want and keep it consistent across their entire product range, regardless of underlying hardware.

This brings us to…

Portability

Qt is really useful for developing applications with a high degree of portability. This stems from several key factors:

Cross-platform development: Qt utilises a single codebase that can be compiled and run on various operating systems, including Windows, macOS, Linux, and embedded systems. This reduces the need to write and maintain separate codebases for different platforms, saving time and resources.

Abstraction layer: This shields developers from the underlying differences between operating systems and allows them to focus on the core application logic without getting bogged down in platform-specific details.

Familiar UI elements: Qt applications can leverage a platform’s widgets—buttons, menus, text boxes, progress bars, and so on—and styles, ensuring the application integrates with the user’s environment. This enhances the user experience and fosters a sense of familiarity.

Achieving perfect portability might require some platform-specific adjustments, but Qt offers tools and libraries to manage these variations.

Tooling for testing

Whether you’re using automated or manual testing, setting appropriate test boundaries is important for ensuring complete test coverage.

At one end of the scale, we can restrict a boundary to individual software blocks (unit testing); at the other, we can set a test boundary around the entire system, which might require more complex test methods such as using robotic process automation (RPA) to physically interact with the system and cameras to monitor screens.

Animation showing different sized test boundaries. The smallest encompass only individual software blocks. As they get bigger, they include the processor, then the whole device and GUI.

Expanding the test boundary allows for more comprehensive testing, providing a more accurate representation of the real-world use of the system, including hardware testing. While beneficial, this approach also has its downsides: as the test boundary expands, tests can become more brittle. For instance, if you were to change a screen layout, it might cause a test involving a robot pushing a specific button to fail.

Qt applications, however, can be tested across a broad range of boundary sizes.

Tools like Squish offer automated UI testing. It allows developers to record and playback user interactions and supports writing more complex test scripts. Its property-based identification helps tests remain functional even with minor UI adjustments.

For instance, a button can be tested by sending a message to the test framework saying: Press the button with the ID, ‘Start’. Unlike the robot test, that button will be pressed wherever it has been moved.

Qt can also integrate with external hardware testing frameworks, allowing development teams to leverage tools like robotic arms or device emulators to test the system as a whole.

Getting everyone on the same page

From the business side, Qt has some powerful advantages. However, most engineers will not necessarily consider these when designing technical architecture. They’re more likely to care about performance: How easy is it to code? How flexible is it? Can the processor be changed? And so on.

These are all crucial considerations and a well-chosen framework should address them effectively.

In a previous blog, we discussed the Agile principle of ‘optimising the whole’. This emphasises the inclusion of stakeholders from across the business in architectural decisions—technical, collaboration, tooling, and documentation.

This holistic approach prevents knowledge silos and can ensure that the chosen framework addresses both technical needs and testability.

Qt’s strengths that we’ve discussed—uniformity of design, portability, and test tooling—span each architecture type and help development teams work towards this optimisation. This makes it a valuable asset for businesses seeking efficient and effective UI development, and, as such, Qt deserves strong consideration when deciding on framework options.

In Part Two…

There are clearly some substantial advantages to Qt from the business side, but what do developers think? In Part Two, we will talk to one of Bluefruit’s senior developers, who takes quite a different perspective.

Did you know that we have a monthly newsletter?

If you’d like insights into software development, Lean-Agile practices, advances in technology and more to your inbox once a month—sign up today!

Find out more