• Stars
    star
    551
  • Rank 80,199 (Top 2 %)
  • Language
    Go
  • License
    GNU Lesser Genera...
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

qt.go

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

Features

  • 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

Installation

requirement
  • go 1.9+
  • libffi
  • dlfcn (windows)
FFI

Make sure libffi is installed

Debian based: apt-get install libffi-dev

Arch based: pacman -S libffi

MacOS: brew install libffi

qt.go:
go get -v -u github.com/kitech/qt.go
runtime dependency:
git clone https://github.com/kitech/qt.inline.git
cd qt.inline
cmake .
make
cp libQt5Inline.so /usr/lib/libQt5Inline.so
uic/rcc
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

Examples

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)
    btn.Show()
    app.Exec()
}

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

Community

Internals

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

More Repositories

1

php-go

Write PHP extension using go/golang. Zend API wrapper for go/golang.
C
882
star
2

wxagent

A Linux weixin agent daemon based on web weixin API.
Python
75
star
3

cygo

A toy programming language base on Golang and compile to C, no name yet
Go
36
star
4

qt.rs

Qt5 binding for rust language. (stalled)
Rust
35
star
5

ruby-jit-qt

A Qt5 binding for Ruby language. Using clang/llvm JIT engine. (stalled)
C++
12
star
6

qt.inline

Qt5 C wrapper for FFI invoke original used in https://github.com/kitech/qt.go
C++
10
star
7

goplusplus

go++, golang++, goplusplus. Make golang more featureful.
Go
10
star
8

mwget

multi thread wget like command line tool
C++
9
star
9

android-nmp

android nignx mysql/sqlite php
C
8
star
10

parallel-ssh

little modified from original parallel-ssh for suite my work needs;
Python
5
star
11

kitphone

skype/sip cluster
C++
4
star
12

nullfxp

C
4
star
13

qt.gen

Go
3
star
14

triline

some little scripts for linux
Emacs Lisp
3
star
15

larbin

fork from original larbin.sf.net for custom develop
C
3
star
16

mod_authnz_external

Authentication via ACM class LDAP
C
2
star
17

snsnotify

snsnotify
C++
2
star
18

go-plugin

Unloadable Golang plugin system over CGO.
2
star
19

vmware-modules

arch linux newest vmware modules pkgbuild and patches
C
2
star
20

godsts

try make emirpasic/gods thread safe
Go
2
star
21

tinycc

Fork of https://repo.or.cz/tinycc.git
C
1
star
22

nullget

1
star
23

algosets

Some algorithm study implmention collections.
C++
1
star
24

lang-binary-size

Programming language binary size compare
Go
1
star
25

qalife

C++
1
star
26

cms-drupal

PHP
1
star
27

gearmand

在阅读代码过程中,为了方便理解,添加的一些启发性注释。
C++
1
star
28

cosp-android-ffmpeg

C
1
star
29

konsole

一个能记录会话的konsole和自动登陆的konsole版本
C++
1
star
30

congo

Go code compile to C, with an generic Go core features (goroutine,channel,defer,GC)
1
star
31

karia2

C++
1
star
32

gearman-cgo

gearman-cgo
Go
1
star
33

minqt4go

C++
1
star