qml_zig
kassane/qml_zig
Apache-2.0
QML bindings for the Zig programming language
858552
5
qml-bindings, qml-zig, zig, zig-package, ziglang
build.zig.zon build.zig
View on Github Updated: 1:04:29 PM Mon Sep 02 2024Size: 1691KBCreated: 5:33:55 PM Sat Dec 19 2020
Dependencies:
dotherside
zig fetch --save https://github.com/kassane/qml_zig/archive/refs/tags/v0.2.tar.gz
Copy to clipboard
QML-zig
Bindings are based on DOtherSide C bindings for QML Library is mostly feature-compliant with other bindings based on the library, but lacks some minor features and has quite a few bugs.
Preview
Build - Steps
Requirements
All software required for building.
- Qt 5.15 or higher
- Zig v0.12.0, 0.13.0 or master
- CMake v3.2 or higher (DOtherSide build)
Question
Works on Qt6?
Maybe, check DOtherSide support!!
Instructions
# Clone repo
git clone --recursive https://github.com/kassane/qml_zig
# Open folder
cd qml_zig
# build DOtherSide
zig build cmake
# Build
zig build ExampleName -Doptimize=ReleaseSafe|-Doptimize=ReleaseFast|-Doptimize=ReleaseSmall
Examples
zig build Animated
- Run an Animated Box
zig build Hello
- Hello World, with Menu and Clickable Button
zig build Cells
- Cells example from QML Tute, click a color to change the text
zig build Button
- Button with 2-way comms to the Zig code
zig build Layouts
- Layouts examples
zig build Splits
- Splitview example
zig build Tables
- Tableview example
Work in Progres Examples
zig build Particle
- Particle system example
- Needs QObject wrapper working yet, to pass zig objects to the QML side
Status
- Basic initialization and execution
- More Examples - thanks @zigster64!
- Providing properties to QML files
TODO
- QAbstractListModels
- QObject - working progress
- QStyle