В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
#Iran
Ali #Larijani sarebbe inoltre stato ucciso assieme al figlio Morteza, al Vice Capo della Sicurezza del Segretariato del Consiglio Supremo di Sicurezza Nazionale Alireza #Bayat e varie guardie con loro presenti.
@OsservatorioEsteri
Ali Larijani, a woulnd-be new ruler of Iran, says in his post that all will remain intact after the death of Khamenei...
#larijani#ruler#iran
📱American Оbserver - Stay up to date on all important events
🇺🇸
🇮🇷 Une cérémonie d'adieu se déroule à Téhéran pour rendre hommage au secrétaire du Conseil suprême de sécurité nationale iranien, Ali Larijani, au chef de la force paramilitaire Basij, le général Gholamreza Soleimani, et aux marins de la frégate IRIS Dena.
#cérémonie#larijani#marins
🔤🔤🔤🔤2️⃣
The US-Israeli war on Iran is in its third week, with at least 2,000 people killed and no end in sight. The strait of Hormuz remains largely closed off and US allies have rebuffed calls from the US president, Donald Trump, for them to help to reopen the vital waterway, through which about 20% of global oil and liquefied natural gas flows.
Probably more than any other Iranian politician, Larijani combined Iran’s military and political strategy. His death will confirm the prime role the Islamic Revolutionary Guards Corps plays in Iranian politics. On Monday, a former long-time IRGC commander, Mohsen Rezaee, was appointed military adviser to the new supreme leader.
Larijani had been seen as one of the more pragmatic faces of Iran’s establishment – who helped steer nuclear negotiations with the west – but that image later hardened. Hours after US and Israeli strikes killed Khamenei, Larijani delivered a defiant message, warning that Iran would make its enemies “regret” their actions and promising a forceful response.
An Israeli official said a strike on Larijani had originally been planned for the previous night but was postponed at the last minute.
Intelligence received on Monday afternoon indicated that Larijani was due to arrive at one of several apartments he used as a hideout, the official said. He was reportedly there with his son when the strike was carried out.
When news he had been targeted began to circulate early on Tuesday, with his fate remaining unclear, another senior Israeli official said “there was no chance he survived this attack”.
In a handwritten statement issued by Iran state TV, Larijani had praised the bravery of Iranian sailors who were killed when their ship was hit by missiles fired by a US submarine off the Sri Lankan coast.
He had written: “Their memory will always remain in the heart of the Iranian nation and these martyrdoms will strengthen the foundation of the Islamic Republic army for years within the structure of the armed forces.”
Born in Najaf, Iraq, in 1958 he studied in Tehran and after the Islamic revolution rose through the ranks of the state, serving as culture minister, head of state broadcasting and, for more than a decade, as speaker of parliament.
As chief nuclear negotiator, he played a key role in shaping Iran’s engagement with world powers, later backing the 2015 nuclear deal.
Though often regarded as a pragmatist within the system, his stance had hardened in recent months, as tensions with Israel and the US escalated and diplomatic efforts faltered.
The US had offered a reward of up to $10m for information on senior Iranian military and intelligence officials, including Larijani, as part of a list of 10 figures linked to the Islamic Revolutionary Guard Corps.
#larijani#dead#iran#trump#hormuz
📱American Оbserver - Stay up to date on all important events
🇺🇸
Iran’s Number 2 Confirmed Dead
🔤🔤🔤🔤1️⃣
Iran’s supreme national security council has confirmed the death of its chief, Ali Larijani, after Israel said it had killed him in an airstrike.
“The pure souls of the martyrs embraced the purified soul of God’s righteous servant, Martyr Dr Ali Larijani,” the council said on Tuesday evening, adding that his son and his bodyguards had died with him.
“After a lifetime of struggle for the advancement of Iran and of the Islamic Revolution, he ultimately attained his long-held aspiration, answered the divine call, and honourably achieved the sweet grace of martyrdom in the trench of service,” it added.
Israel said earlier it had killed Larijani, a linchpin of Iranian politics, in overnight strikes. He is the most senior Iranian figure to die in the war since the supreme leader Ali Khamenei was killed on its first day.
His death removes a pivotal figure at the heart of the regime’s political and security establishment at a moment of acute crisis and represents a devastating blow.
Israel’s defence minister, Israel Katz, said a separate strike had killed the Basij paramilitary force commander, Gholamreza Soleimani, along with other senior Basij figures. Soleimani’s death was later confirmed by Iranian state media.
“Larijani and the Basij commander were eliminated overnight and joined the head of the annihilation programme, Khamenei, and all the eliminated members of the axis of evil, in the depths of hell,” Katz said on Tuesday.
Trump also hailed Larijani’s reported death, without actually naming him but referring to his supposed role in spearheading the recent crushing of mass protests. “Their leaders are gone,” Trump said of Iran’s clerical regime. “It’s an evil group. I mean, they’ve killed much more than 32,000 people. And the man who was responsible for that was also killed yesterday.”
The twin deaths show Israel still retains intelligence on the movements of Iran’s top leaders inside Tehran, and can use it and the US’s near complete control of Iranian airspace to strike at will.
Larijani had been seen days earlier on the crowded streets of Tehran during the annual Quds day rally.
He was appointed secretary of the supreme national security council in August after the previous US-Israeli attacks on Iran in June 2025, and on Monday issued a statement to Muslims around the world appealing to them to support Iran in its struggle and challenging Gulf leaders to explain why they were still allowing US bases in their countries to be used to attack Iran.
Larijani had also played a key diplomatic role before the war alongside Iran’s foreign minister Araghchi, in trying to persuade the Gulf states to prevent an attack. He forcibly defended Tehran’s tactics in the war, but was seen as a possible transitional figure at the end of the conflict. Israel is sceptical about the concept of a transition from within the regime.
The Turkish foreign minister, Hakan Fidan, said: “The political assassinations perpetrated by Israel, including those of Iranian statesmen and politicians, constitute illegal acts contrary to the laws of war.”
The office of the Israeli prime minister said in a statement that Netanyahu had ordered “the elimination of senior officials of the Iranian regime”.
#larijani#dead#iran#trump#hormuz
📱American Оbserver - Stay up to date on all important events
🇺🇸
📰 Israel Says Larijani Is Dead. Tehran Hasn’t Cashed the Receipt Yet.
Israel’s Defense Minister Israel Katz says Ali Larijani and Basij commander Gholamreza Soleimani were killed overnight, framing it as another step in the hunt for Iran’s leadership. Reuters reports the claim marks a major escalation, but also notes that Iran has not yet confirmed Larijani’s death. That matters. In this war, assassination claims are also information operations until the other side is forced to bury the body.
If true, this is not just another decapitation strike. Larijani is not a field commander or a disposable militia face. He has been one of the regime’s senior political-security brains — a man who lived at the intersection of nuclear doctrine, elite bargaining, and state continuity. The Basij chief is a different kind of scalp: not strategic theory, but domestic repression. Put together, the target set says Israel is not only trying to break Iran’s war machine. It is trying to thin out the people who keep the regime coherent at home and legible to itself.
Katz’s phrasing is revealing too. He did not present the strike as a military necessity alone. He presented it as part of a political extermination list — “the leadership of the terror and repression regime.” That is the language of a campaign moving beyond counterforce into regime attrition. Once you are openly hunting the top layer, the war is no longer about degrading capabilities. It is about making state succession itself unstable.
The only missing piece this morning is Tehran’s answer. If Iran confirms Larijani’s death, the regime will have to prove continuity under fire one more time. If it stays silent, that silence will still cost something, because uncertainty at the top is its own form of damage. Either way, Israel is sending the same message again: missiles hit infrastructure, but assassinations hit confidence.
#BabylonBurning#Iran#Larijani#Israel#FollowTheMoney
📱American Оbserver - Stay up to date on all important events
🇺🇸
#Iran
L’agenzia stampa Fars, conferma la notizia che il Segretario del Consiglio Supremo per la Sicurezza Nazionale Ali #Larijani sia morto a seguito dell’attacco israeliano.
“Ali Larijani, Segretario del Consiglio Supremo per la Sicurezza Nazionale, è stato martirizzato. […] Le anime pure dei martiri hanno accolto l'anima pura di Abdul Saleh God, il martire Dr. Ali Larijani, che, dopo una vita di lotta per il progresso dell'Iran e della Rivoluzione Islamica, ha finalmente realizzato il suo desiderio di lunga data, ha risposto alla chiamata della verità e ha orgogliosamente raggiunto la grazia del martirio nelle trincee del servizio. Egli si unì all'Imam dei Martiri del Ramadan, il Comandante dei Credenti Ali (pace su di lui), e al leader della carovana del martirio e del jihad contro l'America e Israele, Sua Santità l'Ayatollah Seyyed Ali #Khamenei, al suo maestro martire, Sua Santità il Maestro Ayatollah Motahari, e ai suoi compagni martiri Seyyed Hassan #Nasrallah e Hajj Qassem #Soleimani”.
@OsservatorioEsteri