QmlCore is a simple set of tools we (a small team of QML advocates) use since years to simplify the development of HTML5 UIs for both mobile and desktop devices. It was designed with the original QML in mind, while it's not 100% compatible and improved in some aspects. The main concepts are the same though, so if you're familiar with original QML, you could start right away.
QmlCore provides a toolchain written in Python using python-future, allowing it to be run on top of both python versions. Normally you don't need to use them directly.
buildprovides a convenient wrapper around them all.
Any modern Python (2 or 3) will go well. Jinja2 is a different option for templating in case you want more than QML loader in your HTML file, while it's not required for small apps.
To install the requirements run:
python $ pip install -r requirements.txt
git clone [email protected]:pureqml/qmlcore.git
The QML compiler scans source directories for QML files and parses each one. Filename starting with uppercase letter considered component, lowercase instantiated. Project-wide options are stored in the
Manifest is a collection of project-wide hacks we used to botch various projects. Some of them may or may not be useful. *
templater- template engine to use, only 'simple' and 'jinja2' are supported at the moment *
web-prefix- see -p option below, specify css rules prefix *
minify- false/true or compiler name as string, only 'gcc' and 'uglify-js' are supported. google closure compiler requires java to run. *
platformsuse additional platform/*/ files, default and only platform is 'web' for now *
path- additional directories to search sources for
-m, --minifyminify with default option ('uglify-js')
-k, --keepkeep original source after minification, useful for debugging minification warnings
-d, --develdevelopment mode, keep running and wait for changes, requires inotify module
-p, --web-prefixweb prefix, removed default CSS rules, adds 'qml-' prefix for them, allowing you to interchange HTML/QML.
-u, --update-translationupdate translation files, specified in manifest.languages
-j, --jobsrun N jobs in parallel
--boilerplateinitialises bare minimum for quicker kick-off in current directory.
We support many different platforms and video integration variants.
Most notable platforms are: - HTML5 Web Browser (Obviously) with different addons: - Shaka - Dash.js - Video.js Web Extension - ElectronJS - Android (Native engine and Cordova) - IOS (Cordova) - SmartTV Platorms: - Any Android TV via native Android support. - LG (Netcast and WebOS) - Samsung SmartTv (Orsay and Tizen) - OperaTV - Many STB platforms (privately) - Native C++ engine with minimal requirements (EGL or LinuxFB) (privately)
Main repo for Pureqml native Android implementation is https://github.com/pureqml/qmlcore-android.
In order to build native android app you need to: - Install Android SDK and set
ANDROID_HOMEenvironment variable - Run
QmlCore uses Qt-approach to localisation. You write the code in your default language, then generate/update (build -u) .ts translation files, translate them with qt linguist and compile your project. QmlCore recognizes tr, qsTr, qsTranslate function, as well as QTTRNOOP/QTTRANSLATENOOP macros.
QmlCore contains a bare minimum of platform controls: Images, texts, rectangles and model-view-delegate classes. Various controls that might be useful are in a separate repository. Just clone it via
git clone [email protected]:pureqml/controls.gitin your project and that's it!
We require a semicolon after each statement. This may be changed in future.
The biggest discrepancy with original QML is how focus is implemented. We're aiming to have "always-consistent" focus everywhere. You have to mark every focus-able component with
focus: true;property, and the rest should work without tweaking. We provide several convenient properties to handle focus with ease: - activeFocus — this item has current focus and got any user input first - focused — this item has current focus in its parent, but not necessarily focused globally
Please use the following command to get the custom modernizr build page:
head -n2 dist/modernizr-custom.js | tail -n1or just the second line of modernizr-custom.js file
A community sourced database of game controller mappings https://github.com/gabomdq/SDL_GameControllerDB