Skip to content

added pyproject.toml and updated to pyside6 #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2d-list-view/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
- nss=3.46=h39b4b1f_0
- openssl=1.1.1c=h01d97ff_0
- pip=19.2.2=py27_0
- pyside2=5.12.4=py27h9cca949_0
- PySide6=5.12.4=py27h9cca949_0
- python=2.7.15=h8f8e585_6
- qt=5.12.5=h1b46049_0
- readline=7.0=h1de35cc_5
Expand Down
6 changes: 3 additions & 3 deletions 2d-list-view/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
import time
import random

from PySide2 import QtCore as qtc
from PySide2 import QtGui as qtg
from PySide2 import QtQml as qml
from PySide6 import QtCore as qtc
from PySide6 import QtGui as qtg
from PySide6 import QtQml as qml

CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))

Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# pyside2-qml-examples
# PySide6-qml-examples

[![license](https://img.shields.io/github/license/vvzen/pyside2-qml-examples)](https://github.com/vvzen/pyside2-qml-examples/blob/main/LICENSE)
[![license](https://img.shields.io/github/license/vvzen/PySide6-qml-examples)](https://github.com/vvzen/PySide6-qml-examples/blob/main/LICENSE)
![Generic badge](https://img.shields.io/badge/status-wip-yellow.svg)

There 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.
There are very few examples online of **QML** using **PySide6** as a backend, so I decided to start collecting some simple ones while I learn this technology.
I 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).

I'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.
Expand All @@ -20,7 +20,7 @@ In my humble opinion, they really aren't getting the big picture...
- You can create components that define a certain look/behaviour and reuse them (buttons but even lists views, menu bars, etc..)

- Yes, It's still a little bit of a PITA to use QML inside Nuke/Maya/Houdini, but things are slowly changing.
In 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..)
In the meantime, nothing prevents you from doing standalone apps in QML, as long as you've got ways to properly package/source PySide6 (rez, conda, pip, tcl-modules, etc..)

- 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

Expand Down Expand Up @@ -55,7 +55,7 @@ $ qmlscene main.qml

# Examples

Note: The following examples have been tested under `python3.7` and `pyside2=5.13.2`.
Note: The following examples have been tested under `python3.7` and `PySide6=5.13.2`.
They should also work under `python2.7`, but I haven't tested that

## list-view
Expand Down Expand Up @@ -90,7 +90,7 @@ For now, I think that those would be nice:
## Readme & docs
- Improve the wiki! (which is empty, at the moment)
- Improve the readme
- Add relevant links where people can learn more about PySide2 + QML
- Add relevant links where people can learn more about PySide6 + QML
- Start an issue to discuss about something relevant to everybody (IE: how the heck can I use this workflow in Nuke?)

## Code
Expand Down
6 changes: 3 additions & 3 deletions launcher-app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import os
import sys

from PySide2 import QtCore as qtc
from PySide2 import QtGui as qtg
from PySide2 import QtQml as qml
from PySide6 import QtCore as qtc
from PySide6 import QtGui as qtg
from PySide6 import QtQml as qml

CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))

Expand Down
2 changes: 1 addition & 1 deletion list-view/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dependencies:
- py==1.7.0
- pyinstaller==3.4
- pyparsing==2.3.0
- pyside2==5.12.0
- PySide6==5.12.0
- pytest==4.2.0
- python-dateutil==2.7.5
- requests==2.21.0
Expand Down
8 changes: 4 additions & 4 deletions list-view/main.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import os
import sys

from PySide2 import QtCore as qtc
from PySide2 import QtGui as qtg
from PySide2 import QtQml as qml
from PySide6 import QtCore as qtc
from PySide6 import QtGui as qtg
from PySide6 import QtQml as qml

CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))

Expand Down Expand Up @@ -82,7 +82,7 @@ def main():
if not engine.rootObjects():
return -1

return app.exec_()
return app.exec()


if __name__ == '__main__':
Expand Down
54 changes: 54 additions & 0 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions publisher-app/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
import time
import pprint

from PySide2 import QtCore as qtc
from PySide2 import QtGui as qtg
from PySide2 import QtQml as qml
from PySide6 import QtCore as qtc
from PySide6 import QtGui as qtg
from PySide6 import QtQml as qml

CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))

Expand Down
16 changes: 16 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[tool.poetry]
name = "PySide6-qml-examples"
version = "0.1.0"
description = ""
authors = ["Your Name <[email protected]>"]
license = "MIT"

[tool.poetry.dependencies]
python = ">=3.10,<3.12"
PySide6 = "^6.4.0.1"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"