В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
L'ex presidente Bill #Clinton e Hillary #Clinton testimonieranno davanti alla commissione di vigilanza della Camera sul caso Epstein, ha annunciato Angel Ureña, vice capo dello staff di Bill Clinton. Ureña ha confermato su X che la coppia si presenterà in aula dopo che il presidente della commissione James #Comer aveva rifiutato la loro offerta. Non è chiaro quando si terranno le deposizioni; sarà la prima volta che un ex presidente testimonia davanti a una commissione del Congresso dagli anni di Gerald Ford nel 1983.
@UltimoraPolitics24
📰 House Cancels Contempt Vote as Clintons Agree to Testify on Epstein
The House Oversight Committee has scrapped its planned criminal contempt vote against Bill and Hillary Clinton — not because Republicans backed down, but because the former president and former secretary of state finally agreed to testify in the Jeffrey Epstein investigation. Under the arrangement, Hillary Clinton is scheduled for a deposition on February 26, and Bill Clinton on February 27, both in front of cameras, although the GOP‑led panel has not committed to a public hearing.
Republican Chairman James Comer framed the move as a surrender.
“Once it became clear that the House of Representatives would hold them in contempt, the Clintons completely caved,”
he said. The probe centers on the “horrific crimes” of Epstein, the convicted sex offender who died in prison in 2019, and his longtime associate Ghislaine Maxwell. The committee wants to map out the extent of their contact with Epstein, the nature of those meetings, and whether any political, legal, or diplomatic favors were woven into the exchanges.
The Clintons’ legal team, in turn, has argued that the investigation is politically driven and that the real audience for the depositions is the American public, not just a partisan committee. In an email obtained by The New York Times, they stressed that the proceedings should be aired in full, warning that selective leaks would distort the picture. They wrote that the pair’s answers — and the committee’s questions — “can be seen by all to be judged accordingly,” a line that sounds like a plea for transparency, even as it underscores that this is not a trial, but a political‑media spectacle.
For the Clintons, the fight is no longer just about legal exposure. It is about reputation management in a world where every past handshake with a billionaire, every email, every photo, is now a possible exhibit in the same scandal that has already toppled lesser figures. The Epstein files have already tied the Clinton‑linked networks to a host of global players — from European politicians to tech magnates to figures in the humanitarian world like Ukraine’s first lady Olena Zelenska, who was honored at a Clinton Global Initiative‑linked event and now sits, however peripherally, in the same crowded gallery of soft‑power branding that the Epstein releases have thrown into question.
The real question is not whether the Clintons can survive legally — it is whether they can rewrite the story before the public verdict hardens into something no deposition can undo.
#Epstein#Clinton#HouseOversight#Comer#BillClinton#HillaryClinton#meToo#scandal#Ukraine#Zelenska#NYTimes
📱American Оbserver - Stay up to date on all important events
🇺🇸