Skip to content
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

refactored pyqt6 to Pyside6 #294

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open

refactored pyqt6 to Pyside6 #294

wants to merge 6 commits into from

Conversation

JTvD
Copy link
Collaborator

@JTvD JTvD commented Dec 23, 2024

Implements #293. There have been a few attempts to move to pyside before, unfortunately there are a few tricky changes between pyqt and pyside.
One of them is the custom UiLoader needed to load UI files in pyside6 like done in pyqt. I have not found any function in the pyside6 library that could be used as alternative.
A second challenge is that the QPlainTextEditLogger, which inherits the 'PySide6.QtCore.QObject' and must therefore be running on the main thread was emitting signals to the qtextedit. This is not needed as a class that has a reference to a widget must be on the mainthread.

Regardless, I changed it is because pyside6 signals do not directly slot into the QT slot like the signals of pyqt6.
there are quite a few topics about this on stackoverflow . For as far as I saw this is the only place where it was done, if it is needed else where a simple pyside6 slot that passes the string to the widget suffices.

Based on a few hours of testing it seems to be working. Nevertheless it is recommended to test the code thoroughly.

Note, the code to create the new ui_files follows in a second pull request.

@JTvD JTvD requested a review from chStaiger December 23, 2024 14:10
@qubixes
Copy link
Collaborator

qubixes commented Dec 23, 2024

@JTvD Thanks a lot! I can confirm that everything seems to work that I have tried so far (which is not much).

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.

2 participants