В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
$PEPE 🐸 has had quite the leap, falling 50% from its high, but the charts suggest a frog-leg kickback might be in sight! Can it reclaim $0.0000014 by Feb end? Only time will tell. #PEPE#Crypto#PricePrediction#Trading📈
📈BTC price at the time of this post: $48041
👉Continue reading
Bitcoin Price Prediction for 2025
James Butterfill, CoinShares head of research, forecasts Bitcoin to hit $80K-$150K in 2025. Trump's pre-election promises could influence the price towards the lower end, while better U.S. regulations might propel it higher. Long-term, Bitcoin's market cap may rise to 25% of gold's, potentially pushing prices to $250K, though this is not expected this year. Details: CoinShares Research
#Bitcoin#Crypto#VC#PricePrediction#MarketCap#Regulations#Gold
Bitcoin Price Predictions for 2025
CoinShares' James Butterfill forecasts Bitcoin to reach between $80K and $150K by 2025. Market corrections may arise due to unmet pro-crypto policies under Trump. A favorable regulatory environment could drive Bitcoin's value toward $250K long-term, increasing its share of the gold market from 10% to 25%. Meanwhile, Bhutan's government has mined Bitcoin for over five years, currently holding over $1.1 billion in Bitcoin as of December 2024. Read more
#Bitcoin#Crypto#Investment#MarketTrends#PricePrediction#Regulation#Bhutan#FinTech#Blockchain#VC
🚀 Zcash's Potential Surge: Traders Predict 60% Chance of Reaching $420
Zcash (ZEC) has experienced a significant rise, with traders on Myriad now predicting a 60% probability of the token reaching $420 this month. According to NS3.AI, Zcash saw an increase of over 62% in the past week, with its price recently hovering around $380. The odds on Myriad shifted dramatically from 80% against the move on Thursday to 60% in favor by Friday.
#Zcash#ZEC#Cryptocurrency#CryptoTrading#PricePrediction#Myriad#NS3AI#CryptoSurge#Blockchain#DigitalAssets
Ethereum ETF Sees Major Inflows
The Ethereum spot ETF recorded a net inflow of $139M last week, with Blackrock's Ethereum ETF, ETHA, gaining $135M. However, on January 27, the crypto market saw declines across sectors, with DeFAI down 28.73%. Other sectors like AI Agents saw a 16.91% drop. U.S. crypto czar David Sacks noted ongoing evaluations regarding Bitcoin and digital assets. Meanwhile, Rosseti, Russia's state power company, plans to introduce Bitcoin mining to leverage idle power resources. Runetoshi's new memecoin, Runes, faced volatility, dropping from $28M to $500k in market value. Arthur Hayes predicts Bitcoin could dip to $70,000 before a future rise to $250,000 this year. More on ETF inflows | Market drop details | David Sacks comments | Rosseti's Bitcoin mining | Runes token collapse | Hayes Bitcoin predictions
#Ethereum#ETF#Crypto#Bitcoin#Russia#Mining#Securities#Stablecoins#PricePrediction#DigitalAssets#Memecoin#MarketDrop#Runetoshi#DeFi#AI#QuantitativeEasing#USDC#WhaleAlert#MarketVolatility#FinancialCrisis#ArthurHayes