В фреймворке 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
[email protected] - Drizzle in my repo today with 2 new apps. Most prominently:
Watomatic – to help those of you still stuck at WhatsApp to leave that s(t)inking ship without being afraid "nobody can find you": it sends auto-responses to everyone writing you, telling them you've left and where to look. So: no more excuses, here's your door! https://apt.izzysoft.de/fdroid/index/apk/com.parishod.watomatic
Further running: SpaceXFollower (SpaceX events, facts, statistics) and Auxio, a nice music player, added yesterday.
Enjoy #foss#Android#apps with #fdroid!
[$] The exploitation paradox in open source
自由开源软件(FOSS)运动的核心是赋予个人和组织自由与权力,但其发展历程中,总存在试图利用FOSS谋取私利的参与者。在2026年比利时根特的配置管理营(CfgMgmtCamp)上,Richard Fontana阐述了开源的“剥削悖论”:即反复出现的危机模式,一些参与者利用规则漏洞来限制自由或在社区中获得对他人的优势。他还讨论了弥补这些漏洞的尝试,以及有必要超越许可证本身,以寻求维持自由的其他手段。
原文链接:https://lwn.net/Articles/1058031/
#开源#FOSS#社区治理#软件自由
#AIGC
Read more
Channel: FOSS Post
Members: ~2.04K
💢 Username: @fosspost
Description:
FOSS Post is a high-quality online magazine about Linux and open source software. This channel posts daily news from all over the web too. Website: https://fosspost.org
🏷 Tags: #technology
#linux#open_source#foss#technology#free_software
https://telegramchannels.me/channels/fosspost
#python#android#android_apps#f_droid#foss#free_and_op#free_and_open_source#izzyondroid#open_source#opensource
This list offers free open-source Android apps for every need—from browsers, cameras, and music players to games, tools, and F-Droid stores like Neo-Store. Get them via F-Droid or IzzyOnDroid for no ads or tracking. It boosts your privacy and freedom by ditching Google apps, letting you control your data and phone fully.
https://github.com/offa/android-foss
🕊️https://exposelsposed.pages.dev— Spread the word.
#FOSS#AgainstProprietary#Transparency#OpenTheSources#DontHide#DontSteal#DontLie#Safety#RespectAndroidCommunity#NoClosedSource