by kitech

kitech / qt.go

Qt binding for Go (Golang) aims get Go's compile speed again.

446 Stars 27 Forks Last release: Not found GNU Lesser General Public License v3.0 160 Commits 7 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:


Qt5 binding for Go (Golang) without CGO that aims to achieve Go's native compile speeds. Instead of using common bindings and heavy C++ wrapper code that forces you to compile and link time and time again, Qt.Go uses FFI so there's only a runtime dependency.

Build Status Go Report Card GoDoc Sourcegraph


  • Binding code with no CGO compile cost
  • Popular Qt5 packages (widgets/QML/extras) support
  • Simple go-uic, go-rcc tools
  • full signal/slot support
  • protected method override support
  • default arguments and value wrapper functions
  • Class/Method/Function/Enum comment for godoc
  • Go side signal/slot definition (experimental)

Multiple platforms support

All platforms should be supported, for now some of them are tested:

  • Archlinux/Ubuntu16+
  • MacOS
  • Android
  • Windows


  • go 1.9+
  • libffi
  • dlfcn (windows)

Make sure libffi is installed

Debian based:

apt-get install libffi-dev

Arch based:

pacman -S libffi


brew install libffi
go get -v -u github.com/kitech/qt.go
runtime dependency:
git clone https://github.com/kitech/qt.inline.git
cd qt.inline
cmake .
cp libQt5Inline.so /usr/lib/libQt5Inline.so
go get -v -u github.com/kitech/qt.go/cmd/go-uic
go get -v -u github.com/kitech/qt.go/cmd/go-rcc

Full Installation


package main
import "os"
import "github.com/kitech/qt.go/qtwidgets"
func main() {
    app := qtwidgets.NewQApplication(len(os.Args), os.Args, 0)
    btn := qtwidgets.NewQPushButton1("hello qt.go", nil)

More complex examples: https://github.com/kitech/qt.go/examples/ https://github.com/qtchina/qt.go.demos/

Go side signal/slot: syntax document usage demo


  • QQ groupchat 933636020
  • Telegram room https://t.me/qtdevjiaoliu (Thanks https://github.com/xiayesuifeng)


Qt.Go uses FFI to call wrapped Qt functions and methods, so there is no compile/link time dependency on Qt, only a run time dependency.

This should make the development and testing phases much faster.

Internal document

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.