В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🚨NASDAQ Tokenization is here.
The SEC just approved NASDAQ’s move to 24/7 trading with T+0 settlement for major indices. It’s no longer a crypto experiment – this is institutional-grade, on-chain access to the US stock market.
S&P Dow Jones Indices just licensed data for perpetual futures on Hyperliquid, bypassing traditional brokers.
This isn’t niche. It’s the future of trading. Don't get left behind.
👇Watch the breakdown now:
🔗https://www.youtube.com/watch?v=qMNRqfVgqPE
#NASDAQTokenization#CryptoFinance#Blockchain
🚀 Orderly Network Announces Management Transition for OmniVault
Orderly Network has announced that Vovega will take over management responsibilities for OmniVault from Kronos. According to Foresight News, the transition will maintain the current management authorization and style, continuing to operate under a fully hedged strategy framework. The focus will remain on minimizing net exposure and drawdowns, aiming to provide depositors with more stable returns.
The transition is scheduled for April 12, with a temporary suspension of deposits and withdrawals at 13:00, resumption at 16:00, and formal completion at 17:00.
#OrderlyNetwork#OmniVault#ManagementTransition#HedgingStrategy#CryptoFinance#StableReturns
🚀 Tokenized RWA Market Expected to Reach $400 Billion by 2030
The distributed tokenized real-world asset (RWA) market is projected to expand significantly, growing from approximately $29 billion today to $400 billion by 2030. According to NS3.AI, a report by Keyrock and Securitize highlights this anticipated growth, noting that RWA perpetual futures volumes have increased 40 times over six months, reaching $67 billion in monthly volume. Additionally, the report indicates that tokenized Treasury bills offered higher returns than DeFi's benchmark stablecoin lending rate on 98% of days in the first quarter of 2026.
#TokenizedAssets#RWA#DeFi#Blockchain#FinancialMarkets#TreasuryBills#DigitalFinance#CryptoFinance#InvestmentTrends#FinTech