GithubHelp home page GithubHelp logo

keenhanzheng / goqt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from visualfc/goqt

0.0 2.0 0.0 832 KB

Golang bindings to the Qt cross-platform application framework.

License: BSD 2-Clause "Simplified" License

Go 76.74% C++ 23.16% QMake 0.02% C 0.08%

goqt's Introduction

GoQt

Introduction

GoQt is golang bindings to the Qt cross-platform application framework.

Experiment

GoQt project current is experiment.

What is GoQt

GoQt is a GUI toolkit for the Go programming language. It allows Go programmers to create programs with a robust, highly functional graphical user interface, simply and easily. It is implemented as a Golang extension module (cgo code) that wraps the popular Qt cross platform GUI library, which is written in C++.

Like Golang and Qt, GoQt is Open Source. The Golang extension module(cgo code) under the BSD license. The C++ bindings library under the LGPL license.

Platforms

  • Golang : 1.5.2

  • GoQt is a cross-platform toolkit, But my test platforms are Microsoft Windows (x86) Qt4.8.5 and Qt5.5.1 toolkit and go1.5.2

Install GoQt

1.get goqt

> go get github.com/visualfc/goqt

2.build qtdrv, need install QtSDK

> cd goqt/qtdrv
> qmake "CONFIG+=release"
> make

3.build rcc

> cd goqt/tools/rcc
> qmake "CONFIG+=release"	
> make

4.build ui, need CGO_ENABLED=1 and install gcc

> cd goqt/ui
> go install -v

5.build examples

> cd goqt\examples\minimal
> build.bat
> ..\..\bin\minimal.exe

Examples

	package main
	
	import (
		"fmt"
		"runtime"
	
		"github.com/visualfc/goqt/ui"
	)
	
	func main() {
		ui.Run(func() {
			info := fmt.Sprintf("Hello GoQt Version %v \ngo verison %v %v/%v", ui.Version(), runtime.Version(), runtime.GOOS, runtime.GOARCH)
	
			lable := ui.NewLabel()
			lable.SetText(info)
	
			hbox := ui.NewHBoxLayout()
			hbox.AddWidget(lable)
	
			widget := ui.NewWidget()
			widget.SetLayout(hbox)
			widget.Show()
		})
	}

Website

goqt's People

Contributors

visualfc avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.