В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
⚡️Buckle up for $CGPTrewards!
📅 Starting: April 11th, at 2PM (UTC)
⚙️ Staking rewards in $CGPT
⚙️ DAO voting power
⚙️ Early access to utilities
⚙️ More TBA!
Prepare your $CGPT tokens and join us tomorrow for the #staking launch event. #ChainGPT
⚡️Storm Trade, a Top DeFi Product, Ready to Launch Its Token
The crypto market is currently going through a phase change: we see a shift in sentiment from memecoins to fundamental projects. Traders are less active in flying into no-name tokens that do not have strong products behind them.
The latest launches of the TON ecosystem are not encouraging, the release of $HMSTR showed how quickly the situation on the market can change, bringing the end of the tap2earn era closer.
And while clickers were taking money from the retail users, the development of DeFi projects continued. In the last 12 months, Perp DEXs have taken center stage in the web3 world. Derivatives trading volumes significantly exceed spot, by 2-10 times, and this figure continues to grow. New players are emerging.
⚡️ChainGPT IDO Starts October 14th
IDO is taking place on the #ChainGPT launchpad, and the premarket on the TON network and on #MagicSquare confidently shows x3 from the initial presale price, which hints at buy pressure and a positive community mood. Only about 4% of the token will be allocated for the IDO.
You already know that $STORM stakers will receive 30% of protocol fees, discounts on fees and additional goodies in the form of #DAO. And the token itself will participate in the liquidity buffer, participating in the constant buyback from the market.
The ChainGPT IDO starts on October 14th, which means the listing will happen very soon, usually within a few days.
In numbers:
⚡️Storm Trade generates from $5M to $40M per day
⚡️The platform rewards liquidity providers with most of the commissions
⚡️4M+ connected wallets
What potential profit awaits holders?
Let's look at an example: over the last 30 days, the platform has collected about $800k in fees (source: DefiLlama), which means that token stakers would have received ~$240k. According to tokenomics and unlocks, only about 20-30M tokens will be available for staking after the launch, and we get ~100% APR for the token price for the IDO. This is without taking into account the rate growth.
While we watch how tapalki are launched and fade away, #StormTrade makes a real product that is already in a popular market segment, and the share of perps continues to grow.
#DYOR and get ready to start:
https://storm.tg/token
#IDO#DEX#Perp#Web3#TON