В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🇺🇸🇺🇦🇷🇺Former Virginia State Senator, Col. Richard H. Black (ret.) on murder ofDugina
"[...]Just this week, Daria Dugina, the daughter of an activist, a pro-Russian activist, was murdered in Moscow, apparently by a Ukrainian assassin who killed her using a bomb that exploded under her car, ripping her body to pieces and burning her to death. Since the United States has admitted being involved in targeting 13 Russian Generals for assassination in Ukraine, it is possible that the CIA provided the targeting information to go after this young woman.
Apparently, they were actually targeting her father. He’s an established pro-Russian pro-war journalist. And they wanted to show that they have the ability to go right into Moscow and to carry out a mafia style hit. So, they did it. I would not be surprised if the CIA provided the targeting information to go after her. It was just a last-minute switch of automobiles that caused the daughter to die instead of the father."
#Dugina#assassination
@american_majority
🇺🇸🇷🇺🇺🇦Former US Marine Corps intelligence officer and UN inspector Scott Ritter:The murder of Daria Dugina was an act of terrorism
'Today, I’m a 61-year-old writer living in the suburbs of Albany, New York. [...] And yet, due to recent circumstances, I once again find myself inspecting my vehicle before getting inside, keeping a watchful eye out for strange vehicles driving down my street and conducting counter-surveillance maneuvers while driving.
Why the paranoia? Simply put, my name has been added to a Ukrainian “kill list.” Think I’m getting too wound up? Ask the family of Daria Dugina, the 29-year-old daughter of the Russian philosopher Alexander Dugin. Both she and her father were on the same list. Both were targeted for death by an assassin dispatched by the Ukrainian security services. [...]
The existence of the Myrotvorets “death list” is an instrument of terror and should be taken down at the insistence of the U.S. Government.'
Source
#Dugina#CIA#Ukraine#assassination
@american_majority
🇺🇸🇺🇦🇷🇺“They Killed Her Because Of Her Ideas”: Russian Political Scientist Valery Korovin on Daria Dugina assissination
"Her death was a serious loss for the global intellectual conservative environment of the opponents of globalization and the very idea of the modern world.
Also, her tragic death as a result of a terrorist act, caused serious damage to the activities of the entire intellectual group headed by the world’s leading philosopher, author of the modern Russian geopolitical school, Eurasianist and intellectual Alexander Dugin.
Serious funds from American taxpayers are spent on personally discrediting Dugin and his movement, one slanderous campaign follows another, the best political technologists are working to discredit Dugin and his ideas in the wake of the State Department and the CIA."
Read the full text
#Dugina#CIA#censorship#Globalists#Biden#Soros
@american_majority
🇺🇸🇺🇦🇬🇧'The beneficiary of the explosion is obvious' - Valery Korovin on Dugina assassination
Russian writer German Sadulaev and political scientist Valery Korovin commented on the killing of Daria Dugina
#Dugina#CIA#MI6#Ukraine#Biden#war#Great_Britain#Soros
@american_majority