В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны.
Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2.
Например, в PyQt4 и PySide есть метод
QHeaderView.setResizeMode
Для PyQt5 и PySide2 они были благополучно переименованы в
QHeaderView.setSectionResizeMode
Чтобы применить этот метод следует использовать такой код
from Qt import QtCompath
header = self.horizontalHeader()
QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed)
Унификация загрузки UI файлов:
# PySide2
from PySide2.QtUiTools import QUiLoader
loader = QUiLoader()
widget = loader.load(ui_file)
# PyQt5
from PyQt5 import uic
widget = uic.loadUi(ui_file)
# Qt.py
from Qt import QtCompat
widget = QtCompat.loadUi(ui_file)
Хорошо что таких моментов не много и их легко запомнить.
Полный список можно посмотреть в таблице.
#qt#tricks
📜
We are aware of the #DengueFever outbreak reported in Sokoto State.
Based on a dynamic risk assessment, the current risk level of the dengue outbreak has been determined to be MODERATE.
However, measures have been taken by the National Emerging Viral Haemorrhagic Diseases Technical Working Group and partners to control the outbreak and prevent the further spread.
🔗Press release
https://ncdc.gov.ng/news/506/ncdc-on-alert-following-the-confirmation-of-the-dengue-fever-outbreak-in-sokoto-state.
In November 2025, 29 suspected cases of dengue fever were recorded, with 6 confirmed and 1 death reported.
Between January and November 2025, a total of 735 suspected cases were reported across the country among both adults and children.
These figures highlight the importance of continued vigilance and preventive action.
Protect Yourself. Avoid mosquito bites by:
✅ Keeping your surroundings clean and free of stagnant water
✅ Supporting community clean-up efforts to reduce mosquito breeding sites
✅ Visit the nearest health facility early if you feel unwell
Full Sitrep: https://ncdc.gov.ng/themes/common/files/sitreps/903d9215ad81cbdee39f6b098f3eea97.pdf
#DengueFever#StaySafe # NCDCNigeria
Mosquitoes are carriers of various diseases, including #Malaria, #YellowFever, #DengueFever, and #ZikaVirus, with cases rising during the rainy season.
You can protect yourself:
➡Eliminate stagnant water to prevent mosquito breeding
➡Use mosquito repellent and wear clothing that covers your arms and legs
➡Sleep under insecticide-treated mosquito nets
➡Keep drainages and gutters clear
➡Install screens on doors and windows
#WorldMosquitoDay
Common Viral Haemorrhagic Fevers #VHFs include #LassaFever, #EbolaVirusDisease, #YellowFever, #DengueFever, #MarburgFever and #CrimeanCongoHaemorrhagicFever.
What are the #InfectionPreventionandControl practices that need to be in place in the management of VHFs?
🔗Download our National Guideline on #IPC for #VHF
https://ncdc.gov.ng/themes/common/docs/protocols/111_1579986179.pdf