Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/symbitic/deno_qml
Qml bindings for Deno
https://github.com/symbitic/deno_qml
Last synced: about 1 month ago
JSON representation
Qml bindings for Deno
- Host: GitHub
- URL: https://github.com/symbitic/deno_qml
- Owner: Symbitic
- License: mit
- Created: 2021-11-07T00:21:30.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-11-07T15:21:20.000Z (about 3 years ago)
- Last Synced: 2024-08-18T00:55:34.030Z (4 months ago)
- Language: TypeScript
- Size: 17.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Deno QML
Bindings to enable native Qt GUIs with Deno.
**CURRENTLY PRE-ALPHA! Expect things to change!**
## Example
**NOTE: FFI in Deno requires the `--unstable` flag as of version 1.15**
```typescript
import { Application } from "./mod.ts";const app = new Application();
const qml = `
import QtQuick 2.15
import QtQuick.Controls 2.15ApplicationWindow {
title: "My Application"
width: 640
height: 480
visible: trueTimer {
interval: 100
running: true
repeat: false
onTriggered: {
button.text = "Poke Me"
}
}Button {
id: button
text: "Push Me"
anchors.centerIn: parent
}
}
`;app.loadData(qml);
const ret = app.exec();
console.log(`Finished: ${ret}`);
```Run it with:
deno run -A --unstable example.ts
## Getting Started
```
git clone https://github.com/Symbitic/deno_qml
cd deno_qml
cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Release .
cmake --build build -j4
```After that, run the example with:
deno run -A --unstable example.ts
## License
[MIT License](LICENSE.md)