Skip to content

Error importing QtWidgets.QWIDGETSIZE_MAX with PySide2/6 #493

@niklashenning

Description

@niklashenning

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)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions