PyQt 6.7.0 QStyle CE_ItemViewItem bug on Windows 11

Phil Thompson phil at riverbankcomputing.com
Thu May 23 12:44:55 BST 2024


On 14/05/2024 16:04, Benjamin Griffiths wrote:
> Hi there,
> 
>  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.
> 
>  I have narrowed it down to the following line in a
> QStyleItemDelegate:
> 
>  style.drawControl(QStyle.ControlElement.CE_ItemViewItem, options,
> painter)
> 
>  If I change CE_ItemViewItem to something else, for example
> CE_MenuItem, the application does not crash.
> 
>  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.
> 
>  Any support would be greatly appreciated.
> 
>  Many thanks,
> 
>  Ben

I don't have Windows 11 so I can't reproduce the problem. However the 
problem is almost certainly a Qt bug.

Phil


More information about the PyQt mailing list