<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="default-style">
Hi there,
</div>
<div class="default-style">
</div>
<div class="default-style">
After upgrading from PyQt 6.6.1 to 6.7.0, my application is crashing silently on Windows 11, it works fine on Windows 10.
</div>
<div class="default-style">
</div>
<div class="default-style">
I have narrowed it down to the following line in a QStyleItemDelegate:
</div>
<div class="default-style">
</div>
<div class="default-style">
<div> <strong>style.drawControl(QStyle.ControlElement.CE_ItemViewItem, options, painter)</strong>
</div>
<div class="default-style">
</div>
<div class="default-style">
If I change <strong>CE_ItemViewItem</strong> to something else, for example <strong>CE_MenuItem</strong>, the application does not crash.
</div>
</div>
<div class="default-style">
</div>
<div class="default-style">
I have attached a minimal reproducable example that uses a QStandardModel and adds QStandardItem's to a QListView with a custom QStyledItemDelegate. Line 31 is what I believe causes the crash. I am using Python 3.10.11.
</div>
<div class="default-style">
</div>
<div class="default-style">
Any support would be greatly appreciated.
</div>
<div class="default-style">
</div>
<div class="default-style">
Many thanks,
</div>
<div class="default-style">
</div>
<div class="default-style">
Ben
</div>
</body>
</html>