В фреймворке 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
#Lassafeverinfo
Our latest Lassa Fever Situation Report has been published on our website (week 23).
This week's situation report and that of previous weeks can be downloaded via https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#Lassafeverinfo
Our latest Lassa Fever Situation Report has been published on our website (week 22).
This week's situation report and that of previous weeks can be downloaded via https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#Lassafeverinfo
Our latest Lassa Fever Situation Report has been published on our website (week 6).
In this reporting week, a total of 68 confirmed cases were recorded.
This week's situation report and that of previous weeks can be downloaded via https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#Lassafeverinfo
Our latest Lassa Fever Situation Report has been published on our website (week 4).
This week's situation report and that of previous weeks can be downloaded via https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#Lassafeverinfo
Our latest Lassa Fever Situation Report has been published on our website (week 2).
This week's situation report and that of previous weeks can be downloaded via https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#Lassafeverinfo
Our latest Lassa Fever Situation Report has been published on our website (week 49).
This week's situation report and that of previous weeks can be downloaded via https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
In total for 2024, 1035 confirmed cases of #LassaFever have been recorded across 28 States in Nigeria.
🔗Download, read, and share our latest #LassaFever situation report via:
https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#LassaFeverInfo
In total for 2024, 1018 confirmed cases and 172 deaths of #LassaFever have been recorded across 28 States in Nigeria.
🔗Download, read, and share our latest #LassaFever situation report via:
https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#LassaFeverInfo
In total for 2024, 1005 confirmed cases of #LassaFever have been recorded across 28 States in Nigeria.
🔗Download, read, and share our latest #LassaFever situation report via:
https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%20in%20Nigeria
#LassaFeverInfo
In this week's #LassaFever situation report, we provide a summary of the epidemiological situation and response activities in Nigeria.
🔗Download, read, and share via
https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%ll20in%20Nigeria
#LassaFeverInfo
In this week's #LassaFever situation report, we provide a summary of the epidemiological situation and response activities in Nigeria.
🔗Download, read, and share via
https://ncdc.gov.ng/diseases/sitreps/?cat=5&name=An%20update%20of%20Lassa%20fever%20outbreak%ll20in%20Nigeria
#LassaFeverInfo
You can not be too safe!
#Lassafever presents with symptoms similar to those of many illnesses like malaria.
Healthcare workers are urged to always have a high index of suspicion and practice standard infection prevention and control measures when attending to patients.
#LassafeverInfo