В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
Ethiopia’s Ruling Party Central Committee Meeting Ahead of National Election. Read more.
https://borkena.com/2026/02/19/ethiopias-ruling-party-central-committee-meeting-ahead-of-national-election/#Ethiopia#EthiopiaNews#Prosperityparty
Andargachew Tsege says EZEMA dead as a political party for a long time. Read more.
https://borkena.com/2026/03/10/ethiopia-andargachew-tsege-says-ezema-dead-as-a-political-party-for-a-long-time/#AndargachewTsege#EthiopiaNews#EZEMA
Berhanu Nega’s Criticism Of The Opposition Quarter, Reactions To It.
https://borkena.com/2026/03/10/ethiopia-berhanu-negas-criticism-of-the-opposition-quarter-reactions-to-it/#EthiopiaNews#News#EZEMA#BerhanuNega#News
Weekly Recap | Addis Standard
Top stories of the week from Ethiopia and the region.
Watch the full recap.
https://youtu.be/Sm_a10BhwSA?si=1FfftVvZP-wBI7Ny
#Ethiopia#AddisStandard#EthiopiaNews#HornOfAfrica#WeeklyNews
Weekly Recap | Addis Standard
Top stories of the week from Ethiopia and the region. Watch the full recap.
#Ethiopia#AddisStandard#EthiopiaNews#HornOfAfrica#WeeklyNews
https://www.youtube.com/watch?v=OlJTzSXAltc
From regional diplomacy to public health updates—here’s what shaped the week in East Africa.
👉 Addis Standard Weekly News Recap covers:
• Red Sea security talks involving Eritrea and Sudan
• Ethiopia’s latest Marburg update
• Major changes in Ethiopia’s media leadership
• U.S.–Somalia aid suspension
• Visa denials affecting Ethiopian athletes
• And more regional & global developments
▶️ Watch, share, and stay informed with Addis Standard.
https://www.youtube.com/watch?v=7n-nq-Dg1Ow
#WeeklyRecap#EthiopiaNews#HornOfAfrica#AddisStandard#AfricanNews
#Premiering_now: The Standard Signal | Ep.15: Ethiopia Under Pressure: Fuel Crisis, Global & Regional Instability, a Fragile Election | Jawar Mohammed
Click here to watch: https://www.youtube.com/watch?v=HexAbPk8Dkw
Ethiopia is facing mounting pressures. In Episode 15 of The Standard Signal, host Tsedale Lamma brings Jawar Mohammed to discuss the deepening fuel shortage and corruption concerns in Ethiopia, the looming fertilizer crisis and its implications for food security, and the impact of Middle East war on Ethiopia’s economy and stability.
#AddisStandard#TheStandardSignal#Ethiopia#JawarMohammed#EthiopiaPolitics#Corruption#FuelCrisis#HornOfAfrica#Tigray#Amhara#Oromia#EthiopiaElection#AfricaPolitics#EthiopiaNews#AfricanPolitics#Geopolitics
#Coming_UP: The Standard Signal | Ep.15: Ethiopia Under Pressure: Fuel Crisis, Global & Regional Instability, a Fragile Election | Jawar Mohammed
#TsedaleLemma speaks with #JawarMohammed about the growing challenges facing Ethiopia, from global and regional tensions to domestic instability, corruption and Ethiopia’s fragile election.
Premiers at: 7:30 PM EAT tonight.
Subscribe to watch: https://www.youtube.com/@AddisStandard
#AddisStandard#TheStandardSignal#Ethiopia#JawarMohammed#EthiopiaPolitics#Corruption#FuelCrisis#HornOfAfrica#Tigray#Amhara#Oromia#EthiopiaElection#AfricaPolitics#EthiopiaNews#AfricanPolitics#Geopolitics