qt
Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
Go language bindings for the Qt graphical toolkit, letting Go developers build native desktop and mobile apps with windows, buttons, and menus across multiple platforms without writing any C++.
Qt is a well-established toolkit for building desktop and mobile applications with graphical interfaces. It has been used for decades to create apps that look and behave consistently across Windows, macOS, Linux, Android, iOS, and more. Normally, you write Qt applications in C++. This project adds a bridge so that Go programmers can build Qt applications without leaving Go.
The binding exposes nearly all of Qt's classes and functions to Go code, meaning a Go developer can create windows, buttons, menus, dialogs, and other standard interface elements using the same language they use for the rest of their program. The project also supports writing Qt apps in JavaScript, TypeScript, Dart, Haxe, and Swift, not just Go, through companion packages.
One of the stated goals is to simplify deployment. Getting a Qt application running on multiple platforms is normally a tedious setup process. This package includes tooling and Docker-based workflows to build and package your app for many different targets, including Raspberry Pi, Android, WebAssembly (for running in a browser), Ubuntu Touch, and AsteroidOS, in addition to the standard desktop platforms.
Installation requires that you already have Go and Git set up, then a few commands fetch and configure the binding. The README notes an experimental mode with fewer dependencies for people who want a quick first look.
The package is licensed under LGPLv3. Qt itself has its own separate licensing. This project is aimed at Go developers who want to build native desktop or mobile applications with a graphical interface and would prefer not to write C++ to do it.
Where it fits
- Build a native desktop app with a real graphical interface using Go instead of switching to C++.
- Deploy the same Go GUI app to Windows, macOS, and Linux from one codebase using Docker-based build tooling.
- Create a mobile app for Android or iOS in Go without learning Swift, Kotlin, or Java.
- Compile a Go desktop app to WebAssembly so it runs in a browser without rewriting the application code.