В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🚀 Circle Mints Additional 250 Million USDC on Solana Blockchain
Circle has recently minted an additional 250 million USDC, according to ChainCatcher. Over the past month, Circle has minted a total of 10.5 billion USDC on the Solana blockchain. This development highlights Circle's ongoing activities in expanding its USDC supply on Solana.
#Circle#USDC#Solana#Blockchain#Crypto#Stablecoin#Cryptocurrency#Minting#DeFi#CryptoNews#SOL
🚀 USDC Treasury Mints 250 Million USDC Without Stated Reason
A recent report from Whale Alert indicates that 250 million USDC has been minted at the USDC Treasury. According to NS3.AI, the report did not specify the reason behind this significant minting event. The lack of explanation has left market participants speculating about the potential implications for the cryptocurrency market.
#USDC#Treasury#Cryptocurrency#WhaleAlert#Minting#NS3AI#MarketSpeculation
🚀 USDC Treasury Mints 250 Million USDC
A significant transaction was reported by Whale Alert, indicating that 250 million USDC was minted at the USDC Treasury. According to NS3.AI, this development could have implications for the stablecoin market, as such large minting activities often influence liquidity and market dynamics. The minting of USDC, a stablecoin pegged to the U.S. dollar, is closely monitored by market participants due to its potential impact on trading volumes and market stability.
#USDC#Treasury#WhaleAlert#Stablecoin#Liquidity#MarketDynamics#Minting#TradingVolumes#MarketStability
🚀 1 Billion DOT Minted and Sold on Ethereum and Polkadot Networks
PeckShieldAlert posted on X that a significant amount of 1 billion DOT tokens were minted and subsequently sold on the Ethereum and Polkadot networks. This development has raised concerns within the cryptocurrency community regarding the potential impact on the market value of DOT tokens. The minting and selling activities were observed on both networks, highlighting the interconnected nature of blockchain platforms. The implications of this large-scale transaction are yet to be fully understood, as stakeholders assess the potential effects on the market dynamics of DOT.
#1BillionDOT#Ethereum#Polkadot#cryptocurrency#marketimpact#PeckShieldAlert#blockchain#DOTtokens#crypto#minting#selling#marketdynamics
Telegram Unveils Major NFT Update
🎉 Telegram introduces a big update allowing gifts and stickers to be converted into NFTs. Gifts gain unique traits like emotions, backgrounds, and colors, enhancing their individuality and value. Rare traits will be limited to 10% of users, creating opportunities for resale at higher prices. Gifts can be converted for 25 Stars, while minting NFTs incurs network fees. Future integration with platforms like Fragment or GG is expected for seamless NFT creation. 🐸 The latest highlight is a unique frog gift gaining traction!
For more details, visit: Full Update
#Telegram#NFT#Gifts#Crypto#Updates#Blockchain#Stars#Minting#Fragment#GG#Frogs#RareItems#DigitalAssets#Community#Market#Trading#Tech#Innovation#SocialMedia#Engagement#CryptoTrends