Skip to content

Upgrade to PySide6#163

Merged
Neverhorst merged 46 commits into
mainfrom
pyside6-dev
May 4, 2026
Merged

Upgrade to PySide6#163
Neverhorst merged 46 commits into
mainfrom
pyside6-dev

Conversation

@TobiasSpohn
Copy link
Copy Markdown
Contributor

@TobiasSpohn TobiasSpohn commented Feb 20, 2026

Description

This PR introduces the upgrade from PySide2 to PySide6. This change no longer requires the maximum Python 3.10 version requirement as well.

The PR is based on PR #45, and mostly contains renaming of the imports.
The upgrade also required the import paths of many of the Qt Enums to be changed.

I used pyrights static type checking to identify the errors of these imports and renamed them until none remained.

Motivation and Context

PySide2 has been for long prohibiting the compatibility of Qudi with newer Python versions (>3.10).
This caused some packages to also have an upper version number limit as they no longer support older Python versions.
Furthermore, support for Python 3.10 ends in fall this year, causing more packages to be incompatible. To ensure continued use of Qudi an upgrade of the Qt framework is necessary.

How Has This Been Tested?

The changes have been tested on various qudi-iqo-modules dummy configurations.
It has also been tested on some confocal setups for at least two weeks, the longest test was since November 2025.

While it seems to work flawlessly on Linux, on Windows machines a Qt Warning is showing up from time to time: The requested buffer size is too big, ignoring. @takuya-ulm investigated this and this seems to originate from the .svg icons of the buttons in the GUI. We did not yet implement a solid solution to prevent these warnings, however they also do not infer with the use of Qudi, they are just once in a while printed to the logger.

Types of changes

  • Bug fix
  • New feature
  • Breaking change (Causes existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • I have documented my changes in /docs/changelog.md.
  • My change requires additional/updated documentation.
  • I have updated the documentation accordingly.
  • I have added/updated the config example for any module docstrings as necessary.
  • I have checked that the change does not contain obvious errors
    (syntax, indentation, mutable default values, etc.).
  • I have tested my changes using 'Load all modules' on the default dummy configuration.
  • All changed Jupyter notebooks have been stripped of their output cells.

Neverhorst and others added 30 commits November 24, 2021 16:15
…er and taskrunner GUI.

 The jupyter project is using qtpy (more trouble than it's worth) but the current PyPI release is not supporting PySide6 yet. Had to install 2.0.0dev from source.
# Conflicts:
#	setup.py
#	src/qudi/util/uic.py
For some reason any of these commands can cause a race condition but
only on Windows, on Linux this worked fine. The race condition leads to
full crash of qudi during startup. Commenting the whole reset function
during startup and later calling it, e.g. via the GUI is fine, no error,
just during startup. Commenting this out for now, do we actually need
it, because the GUI resotres fine, even without these lines...
PySide6 made RecursiveMutex a standalone class, no longer inheriting
from Mutex. Therefore, also our definition is now made standalone.
@TobiasSpohn
Copy link
Copy Markdown
Contributor Author

The changes introduced by @mohitulm, successfully fix the warning messages: The requested buffer size is too big, ignoring

Copy link
Copy Markdown
Member

@Neverhorst Neverhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just quickly tested it with all latest packages and Python version (3.14). The more important test is the field test over a prolonged period of time in the lab, as you did at the IQO.

  • There is a visual bug now with the manager GUI when hovering over a module
    Image
  • I get a Qt warning logged when closing qudi with the time series window open:
    warning Qt QMainWindow::saveState(): 'objectName' not set for QDockWidget 0x2ae61bd1d50 'Trace settings;
    warning Qt QMainWindow::saveState(): 'objectName' not set for QToolBar 0x2ae5f400af0 'Trace controls'
    

Apart from that it seems to run smoothly.👍🏻
If you have used it productively over the last couple of month and introduced basic integration tests, I see no reason not to merge it after the stuff above has been fixed.

Thank you very much for driving this forward @TobiasSpohn

@TobiasSpohn TobiasSpohn requested a review from Neverhorst May 4, 2026 19:01
@TobiasSpohn
Copy link
Copy Markdown
Contributor Author

The latest changes in qudi-iqo-modules address the warning messages that occur on Windows. Thanks for spotting.

Commit 6c740b9 addresses the visual glitch on Windows in the ModuleFrameWidget's.
For this the way how the widgets are drawn was refactored, removing the manual painting that was causing this glitch. Thanks for spotting.

Both changes have been tested on qudi-iqo-modules default configs on Windows 11 and Linux 7.0.2.

Copy link
Copy Markdown
Member

@Neverhorst Neverhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work thanks guys.

@Neverhorst Neverhorst merged commit 43667fc into main May 4, 2026
@Neverhorst Neverhorst deleted the pyside6-dev branch May 4, 2026 19:41
@qku qku mentioned this pull request Jun 2, 2026
11 tasks
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