Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScr
Qt binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScr
Qt is a free and open-source widget toolkit for creating graphical user interfaces as well as cross-platform applications that run on various software and hardware platforms with little or no change in the underlying codebase.
Go, also known as Golang, is a programming language designed at Google.
therecipe/qt allows you to write Qt applications entirely in Go, JavaScript/TypeScript, Dart/Flutter, Haxe and Swift
Beside the language bindings provided, therecipe/qt also greatly simplifies the deployment of Qt applications to various software and hardware platforms.
At the time of writing, almost all Qt functions and classes are accessible, and you should be able to find everything you need to build fully featured Qt applications.
Gallery of example applications.
The following instructions assume that you already installed Go and Git
go get -ldflags="-w" github.com/therecipe/examples/basic/widgets && for /f %v in ('go env GOPATH') do %v\bin\widgets.exego get -ldflags="-w" github.com/therecipe/examples/basic/widgets && $(go env GOPATH)/bin/widgetsset GO111MODULE=off
go get -v github.com/therecipe/qt/cmd/... && for /f %v in ('go env GOPATH') do %v\bin\qtsetup test && %v\bin\qtsetup -test=falseexport GO111MODULE=off; xcode-select --install; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=falseexport GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false| Target | Arch | Linkage | Docker Deployment | Host OS |
|---|---|---|---|---|
| Windows | 32 / 64 | dynamic / static | Yes | Any |
| macOS | 64 | dynamic | Yes | Any |
| Linux | arm / arm64 / 64 | dynamic / static / system | Yes | Any |
| Android (+Wear) | arm / arm64 | dynamic | Yes | Any |
| Android-Emulator (+Wear) | 32 | dynamic | Yes | Any |
| SailfishOS | arm | system | Yes | Any |
| SailfishOS-Emulator | 32 | system | Yes | Any |
| Raspberry Pi (1/2/3) | arm | dynamic / system | Yes | Any |
| Ubuntu Touch | arm / 64 | system | Yes | Any |
| JavaScript | 32 | static | Yes | Any |
| WebAssembly | 32 | static | Yes | Any |
| iOS | arm64 | static | No | macOS |
| iOS-Simulator | 64 | static | No | macOS |
| AsteroidOS | arm | system | No | Linux |
| FreeBSD | 32 / 64 | system | No | FreeBSD |
This package is released under LGPLv3
Qt itself is licensed and available under multiple licenses.
GTK and Native styles not available
`go: modules disabled by GO111MODULE=off` issue while running install script
windows fail
Issue with using *QFileDialog.SelectedFiles(), "interface conversion: interface {} is []interface {}, not []string"
Installation command doesn't work in WIndows or GIt Bash
Gave up - Docs need some work for new people
qtsetup fails
legal requirements for dual licensing
gui.NewQPixmap3() have a requestion?
New and working linux_static deployment dockerfile