In qtpy/QtGui.py there is this line:
from PySide6.QtWidgets import QFileSystemModel
I found this occurrence but maybe there are other ones.
which silently imports QtWidget. I understand it's there for backwards compatibility, but this causes some severe headache for some use cases (i.e. shipping a QML app on Android, the app crash because it doesn't bundle QtWidget binary library in the apk).
Please add an escape hatch to avoid importing QtWidgets inside QtGui.
Suggestion:
def __getattr__(name):
if name == "QFileSystemModel":
from PySide6.QtWidgets import QFileSystemModel
return QFileSystemModel
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
In qtpy/QtGui.py there is this line:
from PySide6.QtWidgets import QFileSystemModelI found this occurrence but maybe there are other ones.
which silently imports QtWidget. I understand it's there for backwards compatibility, but this causes some severe headache for some use cases (i.e. shipping a QML app on Android, the app crash because it doesn't bundle QtWidget binary library in the apk).
Please add an escape hatch to avoid importing QtWidgets inside QtGui.
Suggestion: