GithubHelp home page GithubHelp logo

qmltemplate's Introduction

QML Template Project

QMLTemplate is template for QML application

Directory structure

+---cmake
|   |   Git.cmake                   # CMake contains Git information
|   |   Qt5Configuration.cmake      # CMake contains Qt information
|   \
|---config                          # Json config
|---deploy
|   |   docker                      # Dockerfile
|   |   jenkins                     # Jenkinsfile
|   |   linux
|   |   windows
|   \
|---libs                            # Submodule or 3rdParty
|---resources                       # Image, icon, font, ...
|---src                             # Main source
|---test                            # Test module
|---tools
|---translations                    # Qt translation .ts file
|---UI                              # QML file

How to run

Build source (Qt)

qmake ../qmltemplate.pro -spec linux-g++ CONFIG+=debug CONFIG+=qml_debug    #Linux
qmake ../qmltemplate.pro -spec win32-g++ CONFIG+=debug CONFIG+=qml_debug    #Windows
make -j

Build source (CMake, Ubuntu)

cmake -DQt5_DIR=$$PWD/Qt/5.15.2/gcc_64/lib/cmake/Qt5 -DQML_BUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug ..
make -j

Build source (CMake, Windows)

cmake -DQt5_DIR=$$PWD/Qt/5.15.2/gcc_64/lib/cmake/Qt5 -DQML_BUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++ -DCMAKE_CC_COMPILER=gcc -DCMAKE_MAKE_PROGRAM=mingw32-make -G "MinGW Makefiles" ..
make -j

Run on docker

# Config Xauth (If necessary)
xauth list      # choose port on bottom and set export DISPLAY=${bottom_result}
xhost +         # Disable access control
sudo xhost +local:docker
xauth generate ${DISPLAY} . trusted

# Docker run
docker build --file ./deploy/docker/Dockerfile -t template-qml-docker:1.0 .
docker run -it --name qml-docker --network=host --env DISPLAY=$DISPLAY --privileged --volume="$HOME/.Xauthority:/root/.Xauthority:rw" -v /tmp/.X11-unix:/tmp/.X11-unix --rm template-qml-docker:1.0 /bin/bash

TODO

TODO

qmltemplate's People

Contributors

trungdungit avatar

Watchers

 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.