В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🕵️#Vitalik continues selling $ETH.
In the past 2.5 days, he has sold 3,765 $ETH for $7.08M.
Since Feb 2nd, he has sold 10,723 $ETH for $21.74M at a price of $2,027.
Address: 0xfeb016d0d14ac0fa6d69199608b0776d007203b2
#ETH drop from the support zone might trigger -18% to -20% from the depicted zone, Keep an eye on!!📉
$ETH #ETHUSDT#Vitalik
https://x.com/CryptoBull_360/status/2025739068110487794?s=20
Vitalik Embraces New Milady NFT!
Vitalik Buterin has purchased a Milady NFT and updated his profile picture on X to showcase it. This marks another high-profile acquisition in the NFT space. Read more here.
#Vitalik#Milady#NFT#X#Crypto
📊
🔷⬇️🚨以太坊 基金會 再次出手!鏈上數據 顯示,基金會 近期持續 減持 $ETH 以補充營運資金。
#加密貨幣#區塊鏈#幣圈#以太幣
——— 📊市場情緒觀察 📊———
⚡️曝光新聞👇👇資源搜索群 🖲️👆
💰減持數據一覽:
• 出貨總量: 3,750 $ETH
• 變現總額: 830 萬美元
• 出場均價: $2,214
• 目前國庫餘額: 1,250 $ETH(價值約 277 萬美元)
💡重點分析:
1. 營運支出: 基金會通常在固定週期賣出 ETH 以支付全球開發者薪資及項目資助金(Grants),屬於預期內操作。
2. 逃頂大師再現? 社群始終高度關注 EF 的賣出時機。歷史上 EF 的減持點位常與市場階段性高位重合,本次 $2,214 是否具備參考價值值得深思。
3. 持倉縮減: 隨著國庫中 ETH 直接持倉降至低位,未來基金會可能更傾向於長期財務規劃。
📝原文摘要
The Ethereum Foundation continues to sell $ETH, having sold 3,750 $ETH for $8.3M at an average price of $2,214.
It still has 1,250 $ETH remaining, valued at $2.77M. link
#CryptoNews#Vitalik#行情#鏈上數據
🤣👇
☕️👇 幣圈 区块链新闻
😺👇
Major Unlockings Impacting Crypto Markets
🔑 Over $5M in large unlocks coming in 7 days, affecting tokens like APT, MOVE, and NEON. Total unlocking value surpasses $759M! For more details, visit Tokenomist.
🐦 Vitalik Buterin sells 340B DOG for 5.204 ETH (~$18.9K). Holding 8T DOG valued at ~$483K. Previous sales funded charity. More info here.
💬 Altman confident in AGI development this year.
📄 Buterin's new article on AI regulation, crypto's role in d/acc, and public financing. Read it here.
📈 Metaplanet aims to boost Bitcoin holdings to 10,000 BTC using loans and equity. Current holdings: 1,762 BTC. Full story here.
#Crypto#Unlocks#BTC#Vitalik#AGI#Memecoin#AI#Dogecoin#Altman#Investments#MarketTrends#MetaPlanet#BitcoinHoldings#ETH#MemecoinSales#Charity#PublicFinancing#AIRegulation#dacc#Tokenomist