В фреймворке 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
The Co-optation of Continental Institutions: Abiy Ahmed’s Faustian Bargain with IGAD and the AU, and Its Inevitable Backfire on Ethiopian Stability. Read more.
https://borkena.com/2025/12/04/the-co-optation-of-continental-institutions-abiy-ahmeds-faustian-bargain-with-igad-and-the-au-and-its-inevitable-backfire-on-ethiopian-stability/#Ethiopia#politics#Africa#Institution
Ethnos to Demos: The Vision Confirmed, The Path Diverges. Read more.
https://borkena.com/2025/12/15/ethiopia-ethnos-to-demos-the-vision-confirmed-the-path-diverges/#Ethiopia#politics#institution#ethnicfederalism
📊Sanksiyani bartaraf etish, mintaqaviy integratsiya va institutlar
🟣Oliy maktabda Qozog‘iston Respublikasining Narxoz Universiteti professori Murat Issabayev ishtirokida “Sanksiyani bartaraf etish, mintaqaviy integratsiya va institutlar” mavzusidagiilmiy seminar bo‘lib o‘tdi.
💬Sanction Mitigation, Regional Integration, and the Role of Institutions
🟣The Graduate School hosted a scientific seminar titled "Sanctions Mitigation, Regional Integration, and Institutions," featuring Professor Murat Issabayev from Narxoz University, Kazakhstan.
🏙Устранение санкций, региональная интеграция и институты
🔴В Высшей школе состоялся научный семинарна тему «Устранение санкций, региональная интеграция и институты» с участием профессора Нархозского университета Республики Казахстан Мурата Иссабаева.
#GraduateSchool#Sanction#Integration#Institution
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube
Fed's Role in Bitcoin Reserve Plans
Discussions arise on the establishment of a Bitcoin Strategic Reserve (BSR) if Trump decides to act quickly. The U.S. Treasury could use the Exchange Stabilization Fund to purchase Bitcoin via an executive order. Long-term stability requires congressional legislation to include Bitcoin in the Strategic Reserve Act. Both steps are Treasury-led, firmly placing the Federal Reserve outside of this decision-making process.
In another noteworthy development, blockchain project Trrue has secured a $10 million investment commitment from GEM Digital, despite GEM's background of fraudulent activity, raising concerns over transparency in reporting.
Read more: Wu Blockchain News | CoinDesk | Wu Blockchain News
#Fed#Bitcoin#BSR#UStreasury#ExecutiveOrder#Trrue#Investment#GEMDigital#Fraud#Blockchain#Transparency#Congress#ReserveAct#Crypto#Finance#News#Regulation#Market#Tokens#Ecosystem#Institution