{"id":15009296,"url":"https://github.com/vvzen/pyside2-qml-examples","last_synced_at":"2025-10-11T19:41:17.511Z","repository":{"id":41910136,"uuid":"209740022","full_name":"vvzen/pyside2-qml-examples","owner":"vvzen","description":"Collection of simple examples showcasing qml \u0026 qtquick + PySide2 \u0026 python","archived":false,"fork":false,"pushed_at":"2022-10-31T08:44:19.000Z","size":702,"stargazers_count":54,"open_issues_count":2,"forks_count":9,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-09-29T00:59:03.733Z","etag":null,"topics":["listview","nested-structures","pyside2","python27","python37","qml","qml-samples","qtquick","thread-pool","threads"],"latest_commit_sha":null,"homepage":"","language":"QML","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/vvzen.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}},"created_at":"2019-09-20T08:14:24.000Z","updated_at":"2025-09-09T01:05:27.000Z","dependencies_parsed_at":"2023-01-20T01:16:13.965Z","dependency_job_id":null,"html_url":"https://github.com/vvzen/pyside2-qml-examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vvzen/pyside2-qml-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvzen%2Fpyside2-qml-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvzen%2Fpyside2-qml-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvzen%2Fpyside2-qml-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvzen%2Fpyside2-qml-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvzen","download_url":"https://codeload.github.com/vvzen/pyside2-qml-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvzen%2Fpyside2-qml-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008435,"owners_count":26084460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["listview","nested-structures","pyside2","python27","python37","qml","qml-samples","qtquick","thread-pool","threads"],"created_at":"2024-09-24T19:24:19.292Z","updated_at":"2025-10-11T19:41:17.490Z","avatar_url":"https://github.com/vvzen.png","language":"QML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyside2-qml-examples\n\n[![license](https://img.shields.io/github/license/vvzen/pyside2-qml-examples)](https://github.com/vvzen/pyside2-qml-examples/blob/main/LICENSE)\n![Generic badge](https://img.shields.io/badge/status-wip-yellow.svg)\n\nThere are very few examples online of **QML** using **PySide2** as a backend, so I decided to start collecting some simple ones while I learn this technology.\nI think QML is a great idea that clearly separates logic from presentation, so hopefully people in VFX and Animation will start using it (instead of handling all of the .ui to .py autogenerated code madness).\n\nI've read online about QML from people in VFX and there is a certain sentiment that it's only for creating fancy \"mobile-like\" experiences.\nIn my humble opinion, they really aren't getting the big picture...\n\n#### Why I think QML can be good idea..\n\n- I don't like looking at your 1000 lines of autogerated UI code just to get a feeling of the underneath data model\n\n- No need to use QtDesigner/QtCreator. Iterating a UI mockup is simple enough via `qmlscene` and vim, neovim, vscode, etc.\n\n- It makes it easier to make edits on the presentation layer without touching the python code\n\n- You can create components that define a certain look/behaviour and reuse them (buttons but even lists views, menu bars, etc..)\n\n- Yes, It's still a little bit of a PITA to use QML inside Nuke/Maya/Houdini, but things are slowly changing.\nIn the meantime, nothing prevents you from doing standalone apps in QML, as long as you've got ways to properly package/source PySide2 (rez, conda, pip, tcl-modules, etc..)\n\n- If you're crazy enough and you realize in the mid of a project that you need more performance for the backend, you could potentially rewrite it in C++ and leave the frontend almost untouched\n\n- Great UI performance thanks to the new QtQuick Scene Graph which greatly reduces draw calls (https://doc.qt.io/qt-5/qtquick-visualcanvas-scenegraph.html)\n\n- It finally offers TreeViews and TreeModels!\n\n#### ..and why it's still challenging\n\n- You need to learn something new (pros for some, con for others)\n\n- There's not really a lot of huge amount of documentation for Python as a backend (but if you're here we can change that!)\n\n- You might find it harder to tweak some of the UI elements exactly as you'd like to\n\n- As a framework, it's not as old and mature as QtWidgets, so expect things to change or be deprecated between versions\n\n## FAQs\n\n### How to quickly preview some qml\n\nThis is really useful for prototyping a UI without wanting to write a `main.py` at all.\n```bash\n$ qmlscene main.qml\n```\n\n### Ok, you convinced me. Where can I learn QtQml?\n\n- The official Qt website is a great reference: https://doc.qt.io/qt-5/qmlapplications.html\n- Youtube series by KDAB: https://www.youtube.com/watch?v=JxyTkXLbcV4\n- Udemy course for beginners: https://www.udemy.com/course/qt_quick_qml_tutorial_for_beginners/\n\n# Examples\n\nNote: The following examples have been tested under `python3.7` and `pyside2=5.13.2`.\nThey should also work under `python2.7`, but I haven't tested that\n\n## list-view\nVery simple example showing how to populate a 1d list-view using a model.\n\n![list-view/list-view.png](list-view/list-view.png)\n\n## 2d-list-view\nSlightly more complex example showing how to implement a basic app that uses threads and signals to perform a long blocking calculation without blocking the UI.\nAlso shows an example of a 2d list view where each row item contains sub items.\n\n![2d-list-view/2d-list-view.png](2d-list-view/2d-list-view.png)\n\n## publisher-app\nBoiler-plate code that shows how you could integrate drag \u0026 drop and some parsing logic in order to fill a list view.\nThis could be for example used as the start of an app for publishing frames\n\n![publisher-app/publisher-app.png](publisher-app/publisher-app.png)\n\n## launcher-app\nAn example of an application launcher where updating a dropdown menu causes the update of the others. Uses a reusable `ContextDropDown` qml component that works with a standard `ListModel` with a custom delegate.\n\n![launcher-app/launcher-app.png](launcher-app/launcher-app.png)\n\n\n# How to contribute\n\nAs always, PRs are welcome!\nThere are different types of contributions that you could make.\nFor now, I think that those would be nice:\n\n## Readme \u0026 docs\n- Improve the wiki! (which is empty, at the moment)\n- Improve the readme\n- Add relevant links where people can learn more about PySide2 + QML\n- Start an issue to discuss about something relevant to everybody (IE: how the heck can I use this workflow in Nuke?)\n\n## Code\n- Improving the existing examples to make it easier to follow through\n- Add more generic examples to showcase different usage scenarios (I'd love to see a Text autocompleter implemented in Qml!)\n- Check on all OS (I can only test on macOS and Centos 7.7!)\n- Write tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvzen%2Fpyside2-qml-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvzen%2Fpyside2-qml-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvzen%2Fpyside2-qml-examples/lists"}