В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
CBDCs are no longer theoretical.
The race is on.
Will a country launch a retail CBDC before October 2026?
EdgeMarket lets you explore this through AI driven prediction systems.
The future is probabilistic.
#CBDC#EdgeMarket#AI#Fintech#Macro#FutureFinance
🤝New Exciting Partnership: SLEX Exchange Has Joined the Syscoin Ecosystem🥳
☄️We're thrilled to announce that SLEX Exchange is now a member of the Syscoin ecosystem. It supports low-cost transactions, high throughput, and a variety of decentralized finance (DeFi) applications, making it an attractive ecosystem for developers and users alike✨
📊Joining the Syscoin ecosystem is part of our broader initiative to support a diverse range of blockchains, enhancing the trading experience for our users. We're excited to support the following blockchains, each bringing unique strengths to the table:
🔗Scroll
🔗Zora
🔗Arbitrum
🔗Optimism
🔗zkSync
🔗Linea
🔗Base
🔥Stay tuned for more updates as SLEX will continue to grow and evolve, providing new exciting features for efficient trading!
#SLEXExchange#SyscoinEcosystem#BlockchainDiversity#CryptoTrading#Innovation#FutureFinance
SEC Reviews Bitcoin and Ethereum ETFs
Cboe BZX proposed rule changes to SEC for ARK 21Shares Bitcoin ETF and 21Shares Core Ethereum ETF, allowing in-kind creations and redemptions.
Additionally, Venice, founded by Erik Voorhees, opened its API for AI development and launched the Venice token (VVV) with airdrop to over 250k users.
DARPA initiated a pre-crime AML program to combat digital asset money laundering, raising concerns over discrimination. Kucoin pled guilty to unlicensed money transmitter charges, resulting in deferred prosecution agreements.
Bitcoin prices fluctuating, with recent transactions indicating notable movements.
More developments in the crypto market with potential implications on broader economic issues.
📈 Current Bitcoin price: $102,000.
For more: Nate Geraci, Leviathan News, Leviathan News, Leviathan News
#SEC#Bitcoin#Ethereum#ETF#Crypto#AI#VC#Venice#Kucoin#AML#DARPA#DigitalAssets#CryptoMarket#Investing#MoneyLaundering#FinancialRegulation#Cryptocurrency#TokenLaunch#TechInnovation#FutureFinance#MarketTrends