В фреймворке 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
Otro golpe bajo de la oposición ‼️
🔴#Morena desmintió el informe de #MCCI sobre el inmueble utilizado como sede en la #CDMX📃🖐🏻🚫
https://revistaelpolitico.com/nacional/morena-desmiente-sobreprecio-compra-inmueble/
¡Se les acabó el negocio! ❌💰
🔴#AmparoCasar criticó la resolución del #SAT contra #MCCI y advirtió acciones para que vuelva a recibir donativos 💸👀
https://sinlineamx.com/sat-niega-mcci-recibir-donativos-deducibles-impuestos/
🇮🇳🤝🇷🇺 Strengthening India–Russia Trade
On August 18, we hosted a business meeting at the Moscow Chamber of Commerce and Industry with the FICCI delegation.
✔ Bilateral trade has reached $67B — discussions at Innoprom 2025 aim to expand it to $100B.
✔ Opportunities for India in energy, manufacturing, agriculture, and textiles.
✔ Addressing the trade imbalance and exploring a Rouble–Rupee exchange mechanism.
Recently, I shared India’s perspective on RBK TV after the US imposed a 25% duty on Indian goods:
> “India, as the world’s 4th largest economy, has the right to protect its strategic sovereignty.”
A strong Indian business presence in Moscow reflects our shared commitment to deeper economic cooperation.
#IndiaRussia#Trade#FICCI#MCCI#SoltexGroup