qt README

The project's README from github.com/therecipe/qt. As one markdown file: README.md.

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.

qt (therecipe/qt)

Searching Database…

10.8K ·GitHub
What is this?therecipe/qt is a set of Go language bindings for the Qt GUI toolkit, letting you build full native graphical applications entirely in Go (and also JavaScript/TypeScript, Dart/Flutter, Haxe or Swift).
Is this a GUI framework of its own, or just bindings to Qt?It's a binding layer that exposes the existing Qt C++ widget toolkit to Go — you call real Qt classes and functions from Go code rather than using a Go-native widget set.
How do I get a Qt app building with this?After installing Go and Git, you pick either the experimental cgo-less version (recommended to try first) or the default version, each with its own Windows/macOS/Linux setup steps described in the Installation docs.
Do I need Go and Git already set up?Yes — the installation instructions assume Go and Git are already installed before you add the binding.
Can every target platform be built and deployed the same way?No — most targets (Windows, macOS, Linux, Android, Raspberry Pi, JS, WebAssembly, etc.) support Docker-based deployment from any host OS, but iOS and iOS-Simulator require building on macOS, AsteroidOS requires Linux, and FreeBSD requires FreeBSD, with no Docker deployment available for those four.
Which languages besides Go can use this binding?The project also supports writing Qt apps in JavaScript/TypeScript, Dart/Flutter, Haxe, and Swift, in addition to Go.
Can I deploy my finished app with Docker?Yes, for most deployment targets (Windows, macOS, Linux, Android, Raspberry Pi, Ubuntu Touch, Sailfish OS, JavaScript, WebAssembly) the project supports Docker-based deployment from any host OS.
How much of Qt can I actually use from Go?Almost all Qt functions and classes are exposed, so you can build fully featured Qt applications rather than a limited subset of widgets.
Why pick this over a native Go GUI library?It gives access to Qt's mature, battle-tested widget toolkit and its huge platform reach (from desktop OSes to Sailfish OS, AsteroidOS, and WebAssembly) instead of a smaller Go-only GUI ecosystem.
What are similar projects?moonshine, kivy, PySimpleGUI, fyne, sherpa-onnx, ebiten, supertonic, mygo
Creator
therecipe
Size
171.8 MB
Stars
10.8K
Updated
CommitSep 04
Age
11y
Commits · 90 Days