spyder-ide / qtpy

Provides an uniform layer to support PyQt5, PySide2, PyQt6, PySide6 with a single codebase
MIT License
987 stars 153 forks source link

Error importing QWIDGETSIZE_MAX with PySide6 #493

Open niklashenning opened 2 months ago

niklashenning commented 2 months ago

Importing QWIDGETSIZE_MAX from qtpy.QtWidgets works with PyQt5 and PyQt6, but not with PySide6. I think this might be an issue with PySide6 though, since it's not in PySide6.QtWidgets as the PySide6 documentation suggests. An easy workaround would be defining QWIDGETSIZE_MAX myself since it's always set to 16777215 but maybe I'm missing something obvious here.

Code: from qtpy.QtWidgets import QWIDGETSIZE_MAX

Error when using PySide6: ImportError: cannot import name 'QWIDGETSIZE_MAX' from 'qtpy.QtWidgets' (C:\Users\NH\AppData\Local\Programs\Python\Python311\Lib\site-packages\qtpy\QtWidgets.py)