Cute (Qt) binding for Go (Golang) with support for Windows / macOS / Linux / FreeBSD / Android / iOS / Sailfish OS / Raspberry Pi / AsteroidOS / Ubuntu Touch / JavaScript / WebAssembly
Find a file
therecipe 28d94ab1b1
Merge pull request #1160 from angiglesias/fix-qt5_15_missing_qml_libs
Added "QmlModels" and "QmlWorkerScript" libraries to qtdeploy bundle step
2020-09-01 21:34:22 +02:00
androidextras initial commit of the interop engine + new flutter module + fixes for minor issues 2020-06-01 21:40:46 +02:00
bluetooth various qtbox related fixes 2020-08-27 18:35:50 +02:00
charts various qtbox related fixes 2020-08-27 18:35:50 +02:00
cmd greatly extend the Go <-> Qml/JS interoperability 2019-11-17 18:05:18 +01:00
core various qtbox related fixes 2020-08-27 18:35:50 +02:00
datavisualization various qtbox related fixes 2020-08-27 18:35:50 +02:00
dbus various qtbox related fixes 2020-08-27 18:35:50 +02:00
designer various qtbox related fixes 2020-08-27 18:35:50 +02:00
felgo fixes for various potential memory leaks 2019-11-28 18:42:54 +01:00
flutter add support for haxe and swift + fix interop stack overflow issue 2020-07-01 22:05:31 +02:00
gamepad various qtbox related fixes 2020-08-27 18:35:50 +02:00
gui various qtbox related fixes 2020-08-27 18:35:50 +02:00
help various qtbox related fixes 2020-08-27 18:35:50 +02:00
internal Merge pull request #1160 from angiglesias/fix-qt5_15_missing_qml_libs 2020-09-01 21:34:22 +02:00
interop fix interop pkg 2020-08-29 18:56:51 +02:00
location various qtbox related fixes 2020-08-27 18:35:50 +02:00
macextras various qtbox related fixes 2020-08-27 18:35:50 +02:00
multimedia various qtbox related fixes 2020-08-27 18:35:50 +02:00
network various qtbox related fixes 2020-08-27 18:35:50 +02:00
nfc various qtbox related fixes 2020-08-27 18:35:50 +02:00
positioning various qtbox related fixes 2020-08-27 18:35:50 +02:00
printsupport various qtbox related fixes 2020-08-27 18:35:50 +02:00
purchasing various qtbox related fixes 2020-08-27 18:35:50 +02:00
qml fix interop pkg 2020-08-29 18:56:51 +02:00
quick various qtbox related fixes 2020-08-27 18:35:50 +02:00
quickcontrols2 various qtbox related fixes 2020-08-27 18:35:50 +02:00
remoteobjects various qtbox related fixes 2020-08-27 18:35:50 +02:00
sailfish various qtbox related fixes 2020-08-27 18:35:50 +02:00
script various qtbox related fixes 2020-08-27 18:35:50 +02:00
scripttools various qtbox related fixes 2020-08-27 18:35:50 +02:00
scxml various qtbox related fixes 2020-08-27 18:35:50 +02:00
sensors various qtbox related fixes 2020-08-27 18:35:50 +02:00
serialbus various qtbox related fixes 2020-08-27 18:35:50 +02:00
serialport various qtbox related fixes 2020-08-27 18:35:50 +02:00
speech various qtbox related fixes 2020-08-27 18:35:50 +02:00
sql various qtbox related fixes 2020-08-27 18:35:50 +02:00
svg various qtbox related fixes 2020-08-27 18:35:50 +02:00
testlib various qtbox related fixes 2020-08-27 18:35:50 +02:00
uitools various qtbox related fixes 2020-08-27 18:35:50 +02:00
virtualkeyboard various qtbox related fixes 2020-08-27 18:35:50 +02:00
webchannel various qtbox related fixes 2020-08-27 18:35:50 +02:00
webengine various qtbox related fixes 2020-08-27 18:35:50 +02:00
webkit fixes for various potential memory leaks 2019-11-28 18:42:54 +01:00
websockets various qtbox related fixes 2020-08-27 18:35:50 +02:00
webview various qtbox related fixes 2020-08-27 18:35:50 +02:00
widgets various qtbox related fixes 2020-08-27 18:35:50 +02:00
xml various qtbox related fixes 2020-08-27 18:35:50 +02:00
xmlpatterns various qtbox related fixes 2020-08-27 18:35:50 +02:00
.gitignore cgo-less interop related changes 2020-08-17 18:37:48 +02:00
_config.yml Set theme jekyll-theme-cayman 2017-04-08 21:13:04 +02:00
azure-pipelines.yml use azure pipelines for docker image building 2018-11-07 19:45:50 +01:00
go.mod revert go.mod and go.sum changes 2019-10-15 17:50:15 +02:00
go.sum revert go.mod and go.sum changes 2019-10-15 17:50:15 +02:00
LICENSE Dropping exec permissions on files 2017-04-12 15:21:13 +07:00
qt.go even more changes related to the js binding + fixes for Qt 5.14 2019-12-21 17:42:05 +01:00
qt_android.go minor cleanup 2018-03-20 14:52:35 +01:00
qt_js.go experimental support for the msvc builds to get the webengine/webview modules working on windows 2019-09-10 20:17:30 +02:00
qt_notjs.go more fixes for js/wasm + fix ldFlags issue + fix minor iOS build issue 2018-11-17 02:47:23 +01:00
qt_wasm.go experimental support for the msvc builds to get the webengine/webview modules working on windows 2019-09-10 20:17:30 +02:00
qt_wasm_112.go various changes related to the js binding 2019-12-10 17:08:50 +01:00
qt_wasm_113.go experimental support for the msvc builds to get the webengine/webview modules working on windows 2019-09-10 20:17:30 +02:00
README.md fixes for Qt 5.15 and Go 1.15 2020-08-18 15:25:15 +02:00

Introduction

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.

Impressions

Gallery of example applications.

JavaScript Demo | source

Installation

The following instructions assume that you already installed Go and Git

(Experimental) cgo-less version (try this first, if you are new and want to test the binding)

Windows
go get -ldflags="-w" github.com/therecipe/examples/basic/widgets && for /f %v in ('go env GOPATH') do %v\bin\widgets.exe
macOS/Linux
go get -ldflags="-w" github.com/therecipe/examples/basic/widgets && $(go env GOPATH)/bin/widgets

Default version

Windows (more info)
set 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=false
macOS (more info)
export 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=false
Linux (more info)
export GO111MODULE=off; go get -v github.com/therecipe/qt/cmd/... && $(go env GOPATH)/bin/qtsetup test && $(go env GOPATH)/bin/qtsetup -test=false

Resources

Deployment Targets

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

License

This package is released under LGPLv3

Qt itself is licensed and available under multiple licenses.