В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
EHRC Speaking Out On The Massacre of Orthodox Christians. Read more.
https://borkena.com/2026/03/04/ethiopia-ehrc-speaking-out-on-the-massacre-of-orthodox-christians/#Ethiopia#News#humanrights#EHRC
#Ethiopia: “We have heard nothing about her; we have been weeping for an entire year” – Family of Genet Arage
“We have received no information regarding the matter; we will investigate and provide updates” – #EHRC
The family of Genet Arage, former National Women’s Affairs representative for #EZEMA, say her whereabouts remain unknown a year after she was allegedly taken by individuals described as wearing “red Red bonnet” on 13 February 2025
A close relative told Addis Standard that Genet was at a friend’s residence in the Sidist Kilo area when the incident occurred.
The family said they first learned of her disappearance through a phone call from youths in the neighbourhood who witnessed the incident. According to the relative, those who took her briefly returned her to the house to collect bedding before leaving again.
The family said they have no information about Genet’s current location. They reported the case to the Ethiopian Human Rights Commission...
Read more: https://addisstandard.com/?p=55436
News: #Ethiopia’s candidate elected to UN rights committee
Addis Abeba — Ethiopia’s candidate, Abdi Jibril Ali, has been elected to the #UN Committee on Economic, Social and Cultural Rights following a vote held in #New_York during a session of the United Nations Economic and Social Council.
Abdi secured 49 votes from the 54-member council, emerging among six candidates competing for two seats allocated to the African region. The Committee is composed of 18 independent experts tasked with monitoring the implementation of the International Covenant on Economic, Social and Cultural Rights by States Parties.
The Ministry of Foreign Affairs of Ethiopia congratulated Abdi on his election and wished him success during his four-year term.
In a statement, the Ethiopian Human Rights Commission(#EHRC) also said Abdi, who currently serves as its thematic Commissioner for Civil,
Read more: https://www.facebook.com/100064657363280/posts/pfbid0ziP7fEgBR7UGNxUbCr25v5njojCRLm6W9139TSGQNK5dhtz6dgYJQyeN6hsR5ZvGl/?
News: EHRC sounds warning over civilian harm linked to renewed clashes in #Tigray border areas, as #US lawmaker urges halt to hostilities
#Ethiopia’s Human Rights Commission (#EHRC) has raised alarm over renewed conflict and military movements in border areas of the #Tigray, #Amhara, and #Afar regions, warning of displacement, restrictions on movement, and risks of serious human rights violations, while a senior U.S. lawmaker cautioned that the fighting could plunge the country back into civil war.
In a statement issued on 31 January, the EHRC said it has been monitoring the human rights situation following clashes that began on 26 January 2026 in areas including Tselemti/Telemt, Magale, and Aba’ala.
The Commission said the conflict has created conditions that threaten lives, physical safety, liberty, and property rights.
The developments have also drawn international concern. On 29 January, Gregory W. Meeks, Ranking Member of the U.S. House Foreign .....
Read more: https://addisstandard.com/?p=54865
News: #Ethiopia Rights Commission urges urgent federal, #Oromia action after dozens killed in renewed attacks in Oromia region
The Ethiopian Human Rights Commission (#EHRC) has called on the federal government and the Oromia Regional State to take immediate, tangible, and sustainable measures to halt killings, injuries, property destruction, and displacement in #Arsi_Zone, following renewed attacks that left up to 30 civilians killed.
In a statement on 04 March, the Commission recalled an earlier warning it made in December 2023, noting that although the security situation in the zone had shown temporary improvement, violence has escalated again since October 2025.
According to information gathered from victims’ families, local residents, and government officials, the EHRC said attacks in Shirka, Guna, Merti, Aseko, and Onkolo Wabe woredas have resulted in loss of life, physical injuries, property damage, and displacement driven by security fears........
Read more: https://addisstandard.com/?p=55577
News Analysis: Landslides in #south_Ethiopia expose disaster preparedness gaps as death toll climbs
The death toll from devastating landslides and flash floods triggered by heavy seasonal rains in #Ethiopia’s South Ethiopia Regional State has climbed to 107, according to local authorities, as rescue operations transition into recovery efforts amid warnings of an escalating humanitarian crisis.
The disaster struck several kebeles across #Gacho_Baba, #Bonke, #Kamba_Zuria, and West #Abaya woredas in #Gamo_Zone, on the early morning of 11 March, destroying homes, farmland, and infrastructure, and displacing thousands.
The Ethiopian Human Rights Commission (#EHRC) said today that it has been closely monitoring the aftermath of the catastrophe, describing the situation as severe and calling for an urgent coordinated response from authorities and humanitarian actors. The Commission confirmed widespread loss of life and displacement.
Read more: https://addisstandard.com/?p=55835
#Notice: 48 hours since our colleague Million Beyene disappeared without a trace.
Addis Abeba - Forty-eight hours after he was taken, the whereabouts of #Million_Beyene, Managing Editor of Addis Standard, remain unknown.
The #newsroom has learned that his phone was briefly active at around 10:00 p.m. last night before going silent again, raising further concern about his safety and condition.
His family and colleagues are enduring growing distress.
JAKENN Publishing PLC renews its urgent call for his safe and immediate return, and urges the relevant authorities, including the Addis Ababa Police and the Federal Police Commission, to act without delay to establish his whereabouts.
We also call on the Ethiopian Human Rights Commission (#EHRC) to investigate this apparent enforced disappearance and ensure accountability.
#WhereIsMillion
#JournalismIsNotACrime
#PressFreedom
#BringMillionHome