Skip to content

Rebase #327 and continue migration to PySide6/PyQt6 using qtpy compat layer#420

Closed
jack-mil wants to merge 13 commits into
jchanvfx:mainfrom
jack-mil:pyside6
Closed

Rebase #327 and continue migration to PySide6/PyQt6 using qtpy compat layer#420
jack-mil wants to merge 13 commits into
jchanvfx:mainfrom
jack-mil:pyside6

Conversation

@jack-mil

@jack-mil jack-mil commented May 15, 2024

Copy link
Copy Markdown
Contributor

I am beginning to work on a Qt6 project that will use this library, so I needed to see how feasible porting to Qt6 would be. Work so far is simply rebasing @jowr's work from PR #327 onto main branch, and cleaning up some code added after that PR.

I have done preliminary testing using the example demo with Python 3.12 and QtPy 2.4.1 with both PySide6 v6.7.2 and PyQt6 v6.7.0. (Pyside v6.7.0 has some open bugs with inheritance that prevent the modules from importing properly) Update: These issues are resolved as of v6.7.2 of PySide6, meaning this branch works on all current versions of Qt bindings for Python

Relates to #231

@laurapons

Copy link
Copy Markdown

Very interested on getting an update on this :)

@jack-mil

jack-mil commented Jun 6, 2024

Copy link
Copy Markdown
Contributor Author

I have been using the changes from this fork succesfully for a project with PySide 6.6.3.1 with no issues

@mfieschko

Copy link
Copy Markdown

@jack-mil trying to get your code working on my end - running into the following error using PySide 6.6.3.1 running the example:

Traceback (most recent call last):
  File "NodeGraphQt\examples\basic_example.py", line 28, in <module>
    graph = NodeGraph()
            ^^^^^^^^^^^
  File "NodeGraphQt\examples\NodeGraphQt\base\graph.py", line 158, in __init__
    kwargs.get('viewer') or NodeViewer(undo_stack=self._undo_stack)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "NodeGraphQt\examples\NodeGraphQt\widgets\viewer.py", line 105, in __init__
    self._cursor_text.setFlag(self._cursor_text.ItemIsSelectable, False)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'PySide6.QtWidgets.QGraphicsTextItem' object has no attribute 'ItemIsSelectable'

I get further attribute errors when commenting out the ItemIsSelectable lines. Were you able to run your modifications with the provided example?

@jack-mil

jack-mil commented Jun 25, 2024

Copy link
Copy Markdown
Contributor Author

@fieschkon It's possibly an issue with the QtPy or python version you are running? This is working for me with

  • Python 3.12.3
  • PySide6 6.6.3.1 and 6.7.2
  • QtPy 2.4.1

I can also confirm that upgrading to PySide6 6.7.2 seems to have resolved the issue that was preventing 6.7.0 from working. So, the changes on this branch do work for the most recent versions of PySide6 and QtPy as of 6/25/24.

@jack-mil

jack-mil commented Jun 18, 2025

Copy link
Copy Markdown
Contributor Author

With the recent commits and use of v1.4.1 of qt.py which adds compatibility support for Pyside6 and Pyqt6, along with basic initial testing on my end, it seems that PySide6 (Qt 6) is mostly working for Python versions up to 3.11.

I'll go ahead and close this to reduce clutter as other development work is going on.

@jack-mil jack-mil closed this Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants