В фреймворке 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
SharedTrace
#Python tool for getting additional info by shared link (usernames, avatars, IDs etc).
Support TikTok, Instagram, Discord, ChatGPT, Perplexity and other platforms.
https://github.com/hondling/sharetrace
@cybdetective
#socmint#tracking#trackers#stalking#surveillance#why
SystemD Root Access Exploit Found, Devuan Team Calls SystemD "Unicorn Sh*t"
"Found yet another high severity #systemd bug in #Ubuntu: local root privilege escalation (CVE-2026-3888) https://cybersecurity88.com/news/ubuntu-cve-2026-3888-timing-flaw-in-systemd-cleanup-enables-root-privilege-escalation/ Let us wish all #Devuan users a wonderful day out with their family for a merry father's day, instead of showeling unicorn shit."
https://xcancel.com/DevuanOrg/status/2034560405968712179
https://www.youtube.com/watch?v=_yukEnElXUg
Lennart Poettering
#microsoft#Linux#stalking#surveillance#backdoor#trojan
#Systemd Adds #Age#Verification & #Reddit#Linux Censors Age Verification Posts
Plus: Which Open Source Operating Systems plan to include Age Verification? The Lunduke Journal compiles a list.
Does It Age Verify?:
https://github.com/BryanLunduke/DoesItAgeVerify
https://lunduke.com
https://www.youtube.com/watch?v=M3erhbwqIAM
Lennart Poettering
#microsoft#stalking#surveillance#backdoor#trojan