В фреймворке PyQt (и PySide тоже) часто встречается настройка чего-либо с помощью так называемых флагов.
widget.setWindowFlags(Qt.Window)
Взаимодействие нескольких флагов делается с помощью бинарных (или побитовых) операторов.
Несколько флагов можно указать с помощью оператора "|"
list_item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
исключить флаг из уже имеющегося набора можно так
list_item.setFlags(list_item.flags() ^ Qt.ItemIsEnabled)
Добавить новый флаг к имеющимся можно так
list_item.setFlags(list_item.flags() | Qt.ItemIsEnabled)
А проверка наличия делается так
is_enabled = item.flags() & Qt.ItemIsEnabled > 0
Почему именно так? Всё дело в том как именно работают побитовые операторы. Но об этом в следующем посте.
#qt
¡New build available!
#Matrixx | #diting
Device: Xiaomi 12T Pro | Redmi K50 Ultra
Build Date:2024-03-14
Downloads:
Link |
Changelog:
ROM LOG
- Include genshin fire animation
- Fixed some jittering and lags
- improve the performance
- Sync with last source of matrix
- Bug fixes
- Now ota works
Notes
• Gapps are included
• FW included , meme cam
• Remebering, Don't report bugs without logs.
• CTS pass by default
By @TeamMEX_XDA
Donate PayPal
¡New build available!
#Matrixx | #diting
Device: Xiaomi 12T Pro | Redmi K50 Ultra
MD5SUM:a9a8f235f3a97a076ff3271f145d62c9
Build Date:2024-02-01
Downloads:
Link |
Changelog:
- Fixed eSIM issues (now eSIM should work without more problems)
- Fixed recovery issues no more fstboot when u try to reboot to recovery
- Fixed some internal crashes
Notes
• Gapps are included
• FW included , meme cam
• Remebering, Don't report bugs without logs.
• CTS pass by default
• Clean flash required
Thnks to @Mohammadnt96 for help me with some ideas and tests.
By @TeamMEX_XDA
Donate PayPal
¡New build available!
#Matrixx | #diting
Device: Xiaomi 12T Pro | Redmi K50 Ultra
MD5SUM:423c046d9878a3fc6ca7682639ee2ba1
Build Date:2024-01-19
Downloads:
Link |
Changelog:link
Notes
• Gapps are included
• GTX8_SPI for not working
• Remebering, Don't report bugs without logs.
• CTS pass by default
By @TeamMEX_XDA
Donate PayPal
¡New build available!
#Matrixx | #diting
Device: Xiaomi 12T Pro | Redmi K50 Ultra
MD5SUM:f576c0244e8cc653468173e082e9d96c
Build Date:2024-01-12
Downloads:
Link |
Changelog:
- Fixed codecs issues
- Screenrecord issue was fixed
- Netflix HDR is now working
- Fixed Netflix play issue
- revert some blobs to miui
- Introduce displayfeature color service and use MIUI color modes
- Set standard display color mode in AOD
Notes
• Gapps are included
• GTX8_SPI for not working
• Remebering, Don't report bugs without logs.
• CTS pass by default
By @TeamMEX_XDA
Donate PayPal
¡New build available!
#Matrixx | #diting
Device:Xiaomi 12T Pro | Redmi K50 Ultra
MD5SUM:35348bd7a59d0bf34e4219382862d476
Build Date:2023-12-27
Downloads:
Link |
Changelog:
- Initial public release
- Sepolicy enforcing
Notes
• Gapps are included
• FOD Not working on gtx8_spi touch screen
• Remebering, Don't report bugs without logs.
• CTS pass by default
By @TeamMEX_XDA
Donate PayPal