В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
#Sidama nation celebrates Fichee-Chambalaalla New Year with colorful festivities in #Hawassa
Addis Abeba – The Sidama nation celebrated Fichee-Chambalaalla, its traditional New Year festival, with vibrant festivities in Hawassa, the capital of the Sidama Regional State, on 14 and 15 March 2026.
The two-day celebration, which is inscribed on UNESCO’s Representative List of the Intangible Cultural Heritage of Humanity, drew hundreds of thousands of participants, including community leaders, members of different national groups, and senior officials, to the shores of Lake Hawassa.
Festivities were marked by the traditional Gudumale ceremony, during which elders offered blessings and performed cultural songs, as well as the iconic Chambalaalla feast, symbolizing the transition from the old year to the new with hopes for peace and communal harmony.
Ayiidde Cambalaalla from team Addis Standard.
https://www.facebook.com/share/18B2S3dsvH/?mibextid=wwXIfr
News: #PM_Abiy says military buildup to serve as regional shield, expands training to maritime domain to secure peace from tip of #Somalia to #Massawa port
Prime Minister Abiy Ahmed said the military preparations undertaken by his government are intended to serve as a pillar of support and a shield for countries in the region, announcing that training has expanded into maritime environments to help secure regional peace and combat piracy and terrorism from the tip of Somalia to Massawa port in #Eritrea.
Speaking at the #Hawassa City International Stadium in the Sidama Region on 22 February 2026, Abiy said military training, previously conducted on land, mountains, and rivers, has been broadened to include maritime operations.
He added that Ethiopia would work with “brotherly peoples” to eliminate maritime terrorism along the #Red_Sea corridor to ensure regional development and prosperity.
Field Marshal #Berhanu Jula, Chief of General Staff of the Armed....
Read more: https://addisstandard.com/?p=55313
Business: #Dubai-based premier hospitality group partners with #MIDROC to develop 10 hotels across #Ethiopia
The agreement, signed during the Future Hospitality Summit Africa, held at Radisson Blu Hotel, #Nairobi Upper Hill, between 31 March and 01 April 2026, outlines a multi-year rollout of properties across key destinations including #Addis_Abeba, #Hawassa, #Bahir_Dar, #Jimma, and #Langano.
The developments are expected to deliver approximately 1,140 hotel keys, with phased openings planned between 2026 and 2031.
https://addisstandard.com/?p=56250
News: EPRP calls for nationwide protest on May 8 amid concerns over electoral conditions
The Ethiopian People’s Revolutionary Party (#EPRP) has called for a nationwide peaceful protest to be held on May 8, 2026, citing what it described as the absence of “enabling conditions” for a credible election in #Ethiopia.
In a statement sent to Addis Standard today, the party said the planned demonstrations will take place in several major cities, including #Addis_Abeba, #Mekelle, #Bahir_Dar, #Gondar, #Hawassa, #Adama, and #Ambo, urging #Ethiopians to join what it described as a peaceful effort to demand political reforms.
The EPRP said it supports the transfer of power through elections but argued that current conditions do not allow for a “free, fair, and credible” vote. It accused the ruling Prosperity Party of attempting to conduct what it termed a “pseudo-election” aimed at extending its hold on power, describing the process as
Read more: https://addisstandard.com/?p=56410
#In_Depth_Analysis: The #Hormuz Entanglement: Why #Ethiopia’s fuel crisis is a perfect storm of #war, #graft, and #reform
While the immediate catalyst appears to be the high-stakes military escalation between the U.S., Israel, and Iran, a deeper look reveals that Ethiopia’s fuel misery is a complex entanglement. It is a “perfect storm” where geopolitical vulnerability, a domestic system rotting from within, and a painful macroeconomic experiment have collided to leave 120 million people running on empty.
Until the govt can clean its own house, root out the “senior decision-makers” profiting from the black market, and navigate the treacherous waters of Middle Eastern diplomacy, the accounts emerging from #Gonder to #Jimma to #Ambo, and from #Hawassa to #Bishoftu and #Mekelle, point to an Ethiopia that will remain running on empty.
It will be a country “stalled at the intersection of a distant war it cannot control and a local crisis of governance it has yet to master”...
https://addisstandard.com/?p=56099