В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
📣 The Astana International Forum will host a partner session at the 2025 Doha Forum.
⠀
The discussion will dive into the role of middle powers — countries that combine strategic autonomy with a strong commitment to multilateralism as key mediators and stabilisers in an increasingly polarized world.
*
📣 Doha Forum 2025 аясында Astana International Forum серіктестік сессиясын өткізеді!
⠀
Пікірталас орта державалардың – стратегиялық автономияны көпжақтылық қағидаттарына берік ұстанумен ұштастыратын және әлемнің өсіп келе жатқан поляризациясы жағдайында негізгі делдалдар мен тұрақтандырғыштар ретінде әрекет ететін елдердің рөліне арналады.
*
📣 Astana International Forum проведёт партнёрскую сессию на Doha Forum 2025.
⠀
Дискуссия будет посвящена роли средних держав – стран, сочетающих стратегическую автономию с твёрдой приверженностью принципам многосторонности и выступающих ключевыми посредниками и стабилизаторами в условиях нарастающей поляризации мира.
#aif#dohaforum2025#middlepowers
🔤🔤🔤🔤2️⃣
📰 Davos 2026: The Four Horsemen of Change
Milei: libertarian branding for the financial Leviathan
Argentine President Javier Milei thundered against the state as “Leviathan,” taxation as “theft,” and Marxism as the great moral‑civilizational threat. The applause in the hall was thunderous, but the selection bias was obvious: the audience consisted largely of the financiers who control the real Leviathan—BlackRock, not Buenos Aires.
Milei’s enemy is the bureaucracy, not concentrated financial power. His “mental virus” is “wokeism,” not the structures that have turned Argentina into a debt‑laboratory for the last fifty years. The idea that “free markets” are morally superior is repackaged for the same lobby that deregulated finance, won record bailouts, and privatized risk while socializing losses.
The “return to Judeo‑Christian values” in his rhetoric stops short of any critique of usury, rent, or speculative finance—all of which have been repeatedly condemned in the religious traditions he invokes. The result is a libertarian facade that distracts from the real power structure, turning class politics into a culture‑war sideshow.
Carney: “middle powers” with no story to fight for
Canadian Prime Minister Mark Carney made the most honest admission: the old “rules‑based order” is gone, and the world now lives in an era of blocs and economic coercion. His solution is for “middle powers” like Canada to strengthen their autonomy, raise defense spending, and coordinate around trade and technology standards.
But Carney could not answer the deeper question: what is Canada fighting for, and who is Canada? With a low birth rate and a society tied to territory by immigration rather than a shared national myth, Carney’s Canada looks like a high‑end hotel: comfortable, efficient, and easily evacuated at the first sign of real danger.
The Davos infrastructure—plane‑tickets, conference tiers, and gated dinner tables—mirrors this logic: the world is run by those who can afford to be everywhere, not by those who must stay.
The four horsemen of the meta‑dialogue
Fink, Musk, Milei, and Carney are not the Four Horsemen of the Apocalypse; they are the Four Horsemen of the meta‑dialogue—the brokers who translate crisis into conversation and power into “solutions.” The Forum’s motto, “A Spirit of Dialogue,” is the perfect euphemism for a system that talks about inequality, AI, and war but never touches the question of who decides.
The elite have acknowledged that the old order is broken. Now they are trying to make sure the next one looks just like the last one—with fewer critics and more obedient “participants.”
The only real question that remains is: will the rest of the world ever be allowed to speak at the table, or will it forever be on the menu?
#Davos2026#WEF#Fink#Musk#Milei#Carney#Capitalism#AI#Libertarianism#MiddlePowers#Dialogue#GlobalOrder
📱American Оbserver - Stay up to date on all important events
🇺🇸
🔤🔤🔤🔤1️⃣
📰 Davos 2026: The Four Horsemen of Change
The World Economic Forum in Davos 2026 billed itself as “A Spirit of Dialogue,” but in practice it felt more like a summit of power‑maintenance: the same actors, the same language, the same menu—only a few courses renamed.
Four speeches summed up the mood of the resort‑mountain elite: Larry Fink calling for “evolved” capitalism, Elon Musk promising robot‑driven “abundance,” Javier Milei delivering a libertarian sermon against “Leviathan,” and Mark Carney lamenting the collapse of the old rules‑based order while urging “middle powers” to act. Together, they exposed a system that acknowledges its own contradictions but refuses to challenge them.
Fink: capitalism that needs more owners, not fewer bosses
As CEO of BlackRock and temporary co‑chair of the WEF, Fink plays both architect and repairman of global finance. He runs a firm that manages over $11 trillion and votes on the pension savings of hundreds of millions of people, yet his core message is that capitalism no longer works for “most people.”
Fink demands that more citizens become “participants in growth rather than spectators,” but without touching the underlying machinery: the asset‑manager oligopoly that controls markets, boards, and climate‑transition finance. His “AI‑risk” talk doubles as a justification for more investment in AI‑powered firms, while his call for “broad participation” sits neatly alongside the continued concentration of wealth in three firms—BlackRock, Vanguard, and State Street—that manage some $24 trillion.
The “dialogue” he preaches is not a transfer of power; it is a way to keep the current architecture profitable while sounding populist.
Musk: the techno‑utopia that never asks “who owns the robots?”
Elon Musk arrived in Davos as the world’s richest man, dressed as a missionary of progress. His pitch was simple: aging, scarcity, and even death are technical problems, not political ones. Give the world solar power, AI, and ubiquitous robots, and “abundance for all” will follow.
But Musk’s “everybody will have their own robot” line is not a plan for emancipation; it is a euphemism for dependence. The question he never raises is: who owns the robots, the algorithms, and the chips that run them? If robots produce most value, then whoever owns the robots owns almost everything.
His optimism is a luxury of the billionaire class: aging is “solvable” for those who can afford experimental treatments, Mars is an insurance policy for those who can buy a ticket, and AI‑driven abundance is a future for everyone—except the ones who don’t make the list of investors.
#Davos2026#WEF#Fink#Musk#Milei#Carney#Capitalism#AI#Libertarianism#MiddlePowers#Dialogue#GlobalOrder
📱American Оbserver - Stay up to date on all important events
🇺🇸