Missing variant in QStyle.SubControl

Phil Thompson phil at riverbankcomputing.com
Wed Jan 26 22:15:55 GMT 2022


On 26/01/2022 20:10, Matthieu Dartiailh wrote:
> Here what I tried in a console (on windows, PyQt6 has been installed 
> from pip):
> 
> Python 3.10.0 | packaged by conda-forge | (default, Nov 10 2021,
> 13:20:59) [MSC v.1916 64 bit (AMD64)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> from PyQt6.QtWidgets import QStyle
>>>> dir(QStyle.SubControl)
> ['SC_All', 'SC_CustomBase', 'SC_None', 'SC_ScrollBarAddLine',
> 'SC_ScrollBarAddPage', 'SC_ScrollBarFirst', 'SC_ScrollBarGroove',
> 'SC_ScrollBarLast', 'SC_ScrollBarSlider', 'SC_ScrollBarSubLine',
> 'SC_ScrollBarSubPage', 'SC_TitleBarLabel', '__class__', '__doc__',
> '__members__', '__module__']
> 
> and pip reports:
> 
> PyQt6        6.2.2
> PyQt6-Qt6    6.2.2
> PyQt6-sip    13.2.0

To introspect the members of a Python enum you look at the __members__ 
attribute.

Phil


More information about the PyQt mailing list