В фреймворке 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_Science🇺🇸📕[PDF]⬇️
4 #December2025
#Weekly_Magazines
For learning, for free(dom).
@backupofmagazines
This issue explores a century of quantum mechanics, where breakthroughs in quantum simulators, chemistry modeling, and information hardware illustrate how #QuantumTech and #AI innovation are reshaping modern science. As researchers revisit the Schrödinger equation’s legacy, new discoveries in DNA repair, materials design, and synthetic biology highlight cross-disciplinary shifts fueled by #FutureScience trends. With debates on #SciencePolicy and global collaboration, the issue captures a moment when #ResearchInnovation accelerates faster than ever, redefining both technology and our understanding of reality.
Recent Funding Rounds Overview
🔍Funding Highlights:
- Edera: $15M on Feb 25, 2025. Secure products launch. Learn more
- Zhongjiang Keyi: $13.83M on Feb 24, 2025. Nanjing's new material tech firm. Learn more
- Cholesgen: $13.83M on Feb 24, 2025. Innovating biopharmaceuticals for chronic diseases. Learn more
- Magdrive: $10.50M on Feb 25, 2025. High-power propulsion system for space. Learn more
- Arsenale Bioyards: $10M on Feb 25, 2025. Economical biomanufacturing through precision fermentation. Learn more
- Paradox Immunotherapeutics: $10M on Feb 25, 2025. Focused on rare disease treatments. Learn more
- BitDCA: $7.99M on Feb 24, 2025. New cryptocurrency distribution method. Learn more
- Dametis: $7.33M on Feb 21, 2025. Software for environmental performance challenges. Learn more
- QT Sense: $6.29M on Feb 25, 2025. Quantum sensing tech for biomedical research. Learn more
- Floodbase: $5M on Feb 20, 2025. AI platform for flood risk insurance. Learn more
#Funding#Edera#ZhongjiangKeyi#Cholesgen#Magdrive#ArsenaleBioyards#ParadoxImmunotherapeutics#BitDCA#Dametis#QTSense#Floodbase#Biotech#AI#Crypto#SpaceTech#Pharma#Innovation#EnvironmentalTech#QuantumTech#Biomanufacturing#RiskManagement