QStyleFactory.create SIGSEGV on MacOS
-
Hello,
This simple script is generating a SIGSEGV fault on my configuration:
from PyQt6 import QtWidgets s = QtWidgets.QStyleFactory.create('macOS')My configuration:
- MacOS Monterey 12.6
- Python 3.10.8
- PyQt6
Note that if other styles like 'Fusion' or 'Windows' are used this doesn't fail.
You might argue that creating a 'macOS' style on Macintosh is useless as this is anyway the default style, but that's not my point...Any idea on how to fix that?
Many thanks.
-
Hi,
M1 or Intel ?
-
How did you install these ? Brew ? Pip ? Conda ? A mix of them ?
-
I can confirm the crash, unless you create a QApplication object before calling create.
You should check with the Riverbank Computing folks about that matter.
-
Ok thanks, what's the best way to reach them about issues like that?
Do you recommend using the dedicated mailing list?
https://www.riverbankcomputing.com/mailman/listinfo/pyqt -
In between thanks for your workaround, I thought QApplication.setStyle() needed to be called before creating QApplication object but actually it works also perfectly just after and this prevents to have this SIGSEGV core... I believe we can consider this issue as solved. Thanks again.
-
I tested with PySide6 and Qt 6.4.0 and the same crashes happens so PyQt is innocent in that matter.
I'll open a bug report later.
-
Reported as QTBUG-108047