{"id":26070000,"url":"https://github.com/rcalixte/libqt6zig-examples","last_synced_at":"2026-04-17T21:31:28.519Z","repository":{"id":281244851,"uuid":"944504660","full_name":"rcalixte/libqt6zig-examples","owner":"rcalixte","description":"Qt 6 examples for Zig","archived":false,"fork":false,"pushed_at":"2026-04-15T21:03:58.000Z","size":4341,"stargazers_count":12,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-04-15T23:14:05.211Z","etag":null,"topics":["qt","qt6","zig","zig-application","zig-program","ziglang"],"latest_commit_sha":null,"homepage":"https://rcalixte.github.io/libqt6zig","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rcalixte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-03-07T13:14:24.000Z","updated_at":"2026-04-15T21:04:04.000Z","dependencies_parsed_at":"2025-03-30T03:25:16.698Z","dependency_job_id":"4f83a59a-7d1d-474e-91f8-ec8335c5ef77","html_url":"https://github.com/rcalixte/libqt6zig-examples","commit_stats":null,"previous_names":["rcalixte/libqt6zig-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rcalixte/libqt6zig-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcalixte%2Flibqt6zig-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcalixte%2Flibqt6zig-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcalixte%2Flibqt6zig-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcalixte%2Flibqt6zig-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rcalixte","download_url":"https://codeload.github.com/rcalixte/libqt6zig-examples/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rcalixte%2Flibqt6zig-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31947477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T17:29:20.459Z","status":"ssl_error","status_checked_at":"2026-04-17T17:28:47.801Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qt","qt6","zig","zig-application","zig-program","ziglang"],"created_at":"2025-03-08T23:06:58.052Z","updated_at":"2026-04-17T21:31:28.513Z","avatar_url":"https://github.com/rcalixte.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"###\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg alt=\"libqt6zig-examples\" src=\"assets/libqt6zig-examples.png\" height=\"128px;\" /\u003e\n\n[![MIT License](https://img.shields.io/badge/License-MIT-blue)](https://github.com/rcalixte/libqt6zig-examples/blob/master/LICENSE)\n[![Static Badge](https://img.shields.io/badge/v0.16%20(stable)-fdc009?logo=zig\u0026logoColor=f7a41d\u0026label=Zig)](https://ziglang.org/download/)\n\u003c/div\u003e\n\n---\n\nExample applications using the [MIT-licensed Qt 6 bindings for Zig](https://github.com/rcalixte/libqt6zig)\n\nThese examples can be thought of as instructive templates for using the main library. Though some of the examples have some complexity to them, the intention is to aim for simplicity while demonstrating valid uses of the library. All of source code for the examples are a single file by design. Any auxiliary files are placed in the same directory for either compilation or execution purposes. For a single-application implementation with a simpler build system and limited exercises, check out the [demo](https://github.com/rcalixte/libqt6zig-demo). Please try out the sample applications and start a [discussion](https://github.com/rcalixte/libqt6zig/discussions) if you have any questions or issues relevant to these examples.\n\n---\n\n### TABLE OF CONTENTS\n\n- [License](#license)\n- [Building](#building)\n- [FAQ](#faq)\n  - [Q1. How long does it take to compile the examples?](#q1-how-long-does-it-take-to-compile-the-examples)\n  - [Q2. What build modes are supported by the examples?](#q2-what-build-modes-are-supported-by-the-examples)\n  - [Q3. Are translations supported?](#q3-are-translations-supported)\n  - [Q4. Do the applications built with this library support native styling or theming?](#q4-do-the-applications-built-with-this-library-support-native-styling-or-theming)\n- [Special Thanks](#special-thanks)\n\nLicense\n-------\n\nThe sample applications within `libqt6zig-examples` are licensed under the MIT license.\n\nBuilding\n--------\n\nThe dependencies for building the sample applications are the same as the main library. Refer to the main library's [Building](https://github.com/rcalixte/libqt6zig#building) section for more information.\n\nIt is recommended to execute an initial build to generate a clean build cache before making any changes. This allows the build process to use the cached build artifacts to speed up subsequent builds.\n\nOnce the required packages are installed, the examples can be built from the root of the repository:\n\n```bash\nzig build\n```\n\nTo build and run all of the examples:\n\n```bash\nzig build run\n```\n\nExamples in special subdirectories have per-example options that can be used to explicitly enable or disable them:\n\n```bash\nzig build -Denable-charts -Denable-qscintilla=false\n```\n\nIn the event that one or more extra library include paths are needed e.g. a locally compiled extra library in a non-standard path, the `extra-paths` option supports this use case:\n\n```bash\nzig build -Dextra-paths=\"C:/Qt/6/llvm-mingw_64\"\n```\n\nor\n\n```bash\nzig build -Dextra-paths={\"/opt/qt6\",\"/opt/lib/qt6\"}\n```\n\nFor Windows hosts, there is an additional option to specify the Qt installation directory. This is only required if passing in an alternate extra library path meant to override the default Qt library path:\n\n```bash\nzig build -Dextra-paths=\"C:/Qt/6/llvm-mingw_64\" -DQTDIR=\"C:/Qt/6/llvm-mingw_64\"\n```\n\nExample applications can also be built and run independently:\n\n```bash\nzig build helloworld events\n```\n\nApplications can be installed to the system in a non-default location by adding the `--prefix-exe-dir` option to the build command:\n\n```bash\nsudo zig build --prefix-exe-dir /usr/local/bin # creates /usr/local/bin/{examples}\n```\n\nTo see the full list of examples available:\n\n```bash\nzig build -l\n```\n\nTo see the full list of examples and build options available:\n\n```bash\nzig build --help\n```\n\nThe source code for the examples can be found in the `src` directory of the repository.\n\nFAQ\n---\n\n### Q1. How long does it take to compile the examples?\n\nThe examples compile a subset of the entire main library and then build the sample applications from the source code. The first compilation should take less than 6 minutes, assuming the hardware in use is at or above the level of that of a consumer-grade mid-tier machine released in the past decade. Once the build cache is warmed up for the examples, subsequent compilations should be very fast, on the order of seconds. For client applications that use and configure a specific subset of the main library, the expected compilation time should be similar to the examples.\n\n### Q2. What build modes are supported by the examples?\n\nCurrently, `Debug`, `ReleaseFast`, `ReleaseSafe`, and `ReleaseSmall` are supported. The default build mode is `Debug`. To change the build mode:\n\n```bash\nzig build -Doptimize=ReleaseSafe\n```\n\nor\n\n```bash\nzig build --release=safe\n```\n\n### Q3. Are translations supported?\n\nSeveral options are available to implement translations ranging from functions available in the main library to well-supported systems such as [GNU gettext](https://www.gnu.org/software/gettext/) to [Qt's internationalization options](https://doc.qt.io/qt-6/internationalization.html). Developers are free to use any of the available options or implement their own solution.\n\nThe [lupdate](https://github.com/rcalixte/libqt6zig-examples/tree/master/src/lupdate) example application demonstrates how to use the `lupdate-zig` tool to generate translation files from the source code for use with Qt's translation system.  Refer to the main library's [Tools](https://github.com/rcalixte/libqt6zig#tools) section for more information.\n\n### Q4. Do the applications built with this library support native styling or theming?\n\n\u003ctable align=\"center\"\u003e\n\n| ![endeavour_kde_helloworld](assets/endeavour_kde_helloworld.png) |    ![fedora_kde_helloworld](assets/fedora_kde_helloworld.png)    |\n| :--------------------------------------------------------------: | :--------------------------------------------------------------: |\n|                        EndeavourOS + KDE                         |                           Fedora + KDE                           |\n|  ![freebsd_xfce_helloworld](assets/freebsd_xfce_helloworld.png)  | ![mint_cinnamon_helloworld](assets/mint_cinnamon_helloworld.png) |\n|                          FreeBSD + Xfce                          |                      Linux Mint + Cinnamon                       |\n|         ![macos_helloworld](assets/macos_helloworld.png)         |       ![windows_helloworld](assets/windows_helloworld.png)       |\n|                              macOS                               |                             Windows                              |\n\n\u003c/table\u003e\n\nSpecial Thanks\n--------------\n\n- [@mappu](https://github.com/mappu) for the [MIQT](https://github.com/mappu/miqt) bindings that provided the phenomenal foundation for this project\n\n- [@arnetheduck](https://github.com/arnetheduck) for proving the value of collaboration on the back-end of the library while working across different target languages\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcalixte%2Flibqt6zig-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frcalixte%2Flibqt6zig-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frcalixte%2Flibqt6zig-examples/lists"}