Coder Social home page Coder Social logo

therecipe / widgets_playground Goto Github PK

View Code? Open in Web Editor NEW
48.0 4.0 2.0 7.36 MB

Showcase example for https://github.com/therecipe/qt

Go 78.18% HTML 4.25% JavaScript 13.65% Shell 3.93%
go javascript webassembly qt cross-platform-gui playground example showcase

widgets_playground's Introduction

WEB DEMO


Introduction

This is a showcase example for the "js" and "wasm" targets and also the new JavaScript API of therecipe/qt

Info

For general information about therecipe/qt, checkout: https://github.com/therecipe/qt

The Qt API Docs can be found here: https://doc.qt.io/qt-5/classes.html

If you have questions, join our Slack channel #qt-binding (invite yourself here)

Usage

If you are already familiar with qtdeploy and the docker deployments then just pull the "js" or "wasm" image and deploy with qtdeploy -docker build js or "wasm" as usual.


If you are new and want to build this yourself, then just take the following steps:

  • Install Go: https://golang.org/dl/

  • Install Git: https://git-scm.com/downloads

  • Install tooling: go get -u -v github.com/therecipe/qt/cmd/...

  • Pull the repo: go get -d -v github.com/therecipe/widgets_playground

  • Install Docker: https://store.docker.com/search?offering=community&type=edition

    • On Windows: share the drive containing your GOPATH with docker
    • On Linux: if necessary run docker as root
    • On macOS: share your GOPATH with docker if it isn't located in some subfolder below /Users/, /Volumes/, /private/ or /tmp/
  • Pull the "js" or "wasm" image:

    docker pull therecipe/qt:js
    

    or

    docker pull therecipe/qt:wasm
    
  • Run the deployment: (replace "js" with "wasm" for an full WebAssembly build)

    cd $(go env GOPATH)/src/github.com/therecipe/widgets_playground
    $(go env GOPATH)/bin/qtdeploy -docker build js
    
  • You should find the deployed application in the deploy/js or deploy/wasm subdir

  • Open deploy/{js|wasm}/index.html with your browser


You can most of the time use qtdeploy -docker -fast build js after you made some minor changes, heavier changes like the introduction of new Qt classes or functions, or changes inside the JavaScript files will force you to compile without the "-fast" flag once again.

It's planned to remove these limitations in the future.

widgets_playground's People

Contributors

therecipe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

justforkin iq-scm

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.