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
2015-12-06 00:56:16 +01:00
androidextras extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
bluetooth extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
core extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
dbus extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
gui extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
help extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
internal extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
location extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
macextras extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
multimedia extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
multimediawidgets extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
network extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
nfc extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
positioning extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
qml extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
quick extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
script extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
scripttools extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
sensors extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
sql extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
svg extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
webchannel extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
websockets extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
widgets extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
xml extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
xmlpatterns extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
LICENSE complete rewrite 2015-10-24 17:18:24 +02:00
qt.go support for androidextras 2015-11-19 19:29:30 +01:00
README.md extended androidextras, android objectname fix, merged and cleaned *.h and *.cpp with stable code generation, recovering from panics, updated readme with screenshots 2015-12-06 00:56:16 +01:00
setup.bat support for androidextras 2015-11-19 19:29:30 +01:00
setup.sh support for androidextras 2015-11-19 19:29:30 +01:00

Screenshots

Windows

Mac OS X

Linux

Android

Portrait

Landscape

source


Getting Started

Desktop (Windows / Mac OS X / Linux)

  1. Install Go >= 1.5.2 and setup a proper GOPATH

  2. Install Qt 5.5.1 in C:\Qt\Qt5.5.1\ or /usr/local/Qt5.5.1/

  3. Setup the environment

    • Windows

      • Add the directory that contains gcc.exe to your PATH

        C:\Qt\Qt5.5.1\Tools\mingw492_32\bin

    • Mac OS X

      • Install Xcode >= 7.1.1
    • Linux

      • Install g++

        sudo apt-get install g++

      • Install OpenGL dependencies

        sudo apt-get install mesa-common-dev

  4. Download the binding

    go get github.com/therecipe/qt

  5. Generate, install and test

    github.com/therecipe/qt/setup.bat (run as admin)

    or

    github.com/therecipe/qt/setup.sh


Mobile (Android)

  1. Make sure the binding is working by setting up the desktop version

  2. Install the Android SDK in C:\android\android-sdk\ or /opt/android-sdk/

  3. Install the SDK dependencies with C:\android\android-sdk\tools\android.bat or /opt/android-sdk/tools/android

    • Tools
      • Android SDK Build-tools (23.0.2)
    • Android 5.1.1 (API 22)
      • SDK Platform
    • Extras (Windows only)
      • Google USB Driver
  4. Install the Android NDK in C:\android\android-ndk\ or /opt/android-ndk/

  5. Install Apache-Ant in C:\android\apache-ant\ or /opt/apache-ant/

  6. Install Java SE Development Kit (linux only: install in /opt/jdk/)

  7. Install and test

    github.com/therecipe/qt/setup.bat android (run as admin)

    or

    github.com/therecipe/qt/setup.sh android


Quick Start

  1. Create a folder [GOPATH]/src/qtExample

  2. Create a file [GOPATH]/src/qtExample/main.go

package main

import (
	"os"

	"github.com/therecipe/qt/widgets"
)

func main() {
	widgets.NewQApplication(len(os.Args), os.Args)

	var btn = widgets.NewQPushButton2("Hello World", nil)
	btn.Resize2(180, 44)
	btn.ConnectClicked(func(flag bool) {
		widgets.QMessageBox_Information(nil, "OK", "You Clicked me!", widgets.QMessageBox__Ok, widgets.QMessageBox__Ok)
	})

	var window = widgets.NewQMainWindow(nil, 0)
	window.SetWindowTitle("Hello World Example")
	window.Layout().AddWidget(btn)
	window.Show()

	widgets.QApplication_Exec()
}
  1. Open the command line in [GOPATH]/src and run qtdeploy build desktop qtExample

  2. Wait a minute, then you will find the executable file here [GOPATH]/src/qtExample/deploy/[GOOS]/qtExample

  3. Take a look at the other examples

  4. Make yourself familiar with the qt documentation