Join 10350+ others. No spamming.
I promise!

Follow us at github.



salviati / go-qt5


qt5 bindings for go



Before you start

This is a fork of visualfc's qt4 bindings, and several critical bugs are inherited along the way. Until these bugs are fixed, this package is not recommended for any real use. I don't have any time to actively work on this project, but I'll keep reviewing and merging pull requests.

Meanwhile, have a look at QML bindings for Go.

Before filing an issue

  • Please read the above section first.
  • Make sure it's specifically about the go-qt5 wrappers, and not "how do I do XYZ in Qt?". Such questions are better placed in Qt5 forums.
  • If you find that go-qt5 lacks the wrapper for a particular class you need, feel free to send a patch.


go-qt5 provides with qt5 bindings for Go programming language, based on visualfc's go-ui library.

Lua code that generates the wrappers (uiobjs.go and cdrv.cpp) can be found under make.

The wrapper code is by far incomplete, so pull requests are more than welcome. Adding new functionality usually consists of editing or adding files under make/qt5, and updating make/make.lua script, and making relevant changes in qt5 and qtdrv.


go-qt5 lib BSD
qtdrv lib LGPL

Using go-qt5

1. get go-qt5

$ go get

2. generate bindings

$ cd $GOPATH/src/
$ lua make.lua
$ lua makelib.lua

3. build & install C layer

$ cd $GOPATH/src/
$ qmake "CONFIG+=release"
$ make
# make install go-qt5

$ cd $GOPATH/src/
$ go install examples

$ cd $GOPATH/src/
$ go run minimal.go

A minimal example

package main

import (

func main() {
    qt5.Main(func() {
        w := qt5.NewWidget()
        w.SetSizev(300, 200)
        defer w.Close()