Illustration depicting UI framework

A Comparison of UI Frameworks

By Jeff Tranter

Most programming languages don't directly provide support for developing graphical user interfaces. It is typically done with external software that may be referred to as a library, toolkit or framework. Many such toolkits exist and are distinguished by a number of factors, most notably:

  1. What programming languages they directly support (e.g. C, C++, Python).
  2. What platforms they support (e.g. mobile, desktop, and embedded platforms such as Windows, Linux, macOS, iOS, and Android).
  3. Whether they also provide facilities beyond the user interface, like string handling, containers, file input/output, networking, etc.
  4. What type of license they are distributed under (e.g. open source/free software or commercial/proprietary).

The choice of a toolkit to use can be a daunting one. At ICS we use many different UI frameworks to implement applications with graphical user interfaces. Each has its pros and cons and the choice for a given application depends on a number of factors. I thought it would be interesting to compare the key features of some of the major UI frameworks or toolkits. To reduce the scope of the comparison to a manageable list, I tried to select only toolkits that some specific criteria:

  • Run on multiple platforms
  • Support native development
  • Support using compiled languages
  • Actively being maintained

I came up with 10 frameworks that met these criteria. The table below summarizes their features.

Framework Summary

Name Platforms Languages License Pros Cons Comments
CopperSpice Windows, Linux, macOS. C++ GPL / LGPL Claimed performance improvements over Qt. Should be easy to port most Qt desktop code to it. Desktop/widgets only. Small development team and user base. Not fully compatible with Qt. Fork of Qt 4 that removes the need for moc and uses modern C++ features.
Crank Storyboard Bare metal, various RTOS, VxWorks, Linux, macOS, Windows, Android. C, C++ Commercial GUI builder. Lightweight (suitable for MCUs). UI framework only. Mainly used on MCU platforms.
Dear ImGui Platforms that support DirectX, Metal, OpenGL, or Vulkan. C++ MIT Lightweight. Leverages GPU for rendering. Small development team, incomplete documentation. Primary use cases are games and other applications with a 3D pipeline.
FLTK X11, Windows, macOS. C++ LGPL Lightweight, small, short learning curve. UI framework only. Offers few widgets. Not native look and feel. Mostly used on desktop platforms.
Flutter Android, iOS, Linux, macOS, Windows, web. Dart BSD Simple, short learning curve. Only directly supports the Dart programming language. Developed by Google.
GTK/gtkmm X11, Wayland, Windows, macOS. C, C++ LGPL Stable, widely used. Lack of compatibility across major updates. GTK uses C, gtmmm is the C++ interface.
Qt Android, iOS, Linux, macOS, Windows, and others. C++, QML,  Python GPL, LGPL, and commercial Full cross-platform toolkit, large user base, well documented. Large and complex. Long learning curve. Need to decide whether to use widgets or QML.
Slint Windows, Linux, macOS, and some MCUs. C++, Rust, JavaScript GPL or commercial Lightweight, can run on MCUs. Relatively new with a small user base. Limited MCU support. QML-like markup language.
Unity Windows, Linux, macOS, iOS, Android, and others. C# Commercial 2D and 3D support on many platforms. Good documentation. Closed source, commercial only. Only directly supports C# language (Mono on Linux). Mostly targeted at game development.
WxWidgets Windows, macOS, Linux. C++ LGPL-like Stable, free. Uses native widgets when available. Widgets-only, best suited to desktop applications. Formerly known as WxWindows.

Conclusions

Some of the information is subjective and the list is not exhaustive, but I hope it gives you some basis of comparison that can be helpful in selecting a toolkit or at least narrowing down the list of options to consider.

References

  1. https://en.wikipedia.org/wiki/List_of_widget_toolkits
  2. https://www.slant.co/topics/983/~best-cross-platform-gui-toolkits
  3. https://philippegroarke.com/posts/2018/c++_ui_solutions