Для тех кто пишет расширения на PyQt/PySide для CG-софтов.
Когда я только начинал писать тулзы под Maya (тогда еще версия 2010-2011) мне приходилось ручками ставить PyQt4 под Maya. Даже написал мануалы по установке на своём сайте. Но потом стал доступен из коробки PySide и позже он обновится до PySide2. Для некоторых систем была поддержка PyQt5.
И как простому разработчику поддерживать этот зоопарк? Ведь хочется чтобы тул работал на любой версии (вы тоже делали модуль что-то типа import_qt.py?😁)
На помощь приходит проект Qt.py который поставил себе цель унифицировать использование Qt-биндингов вне зависимости от среды где запускается код. Те, кто давно пишут на Qt, скорее всего знают этот проект.
Он стал стандартом для CG-индустрии и используется в топовых студиях и проектах.
Qt․py помогает запускать один и тот же код на разных платформах с разными вариантами Qt-библиотек. Это может быть как интеграция в CG-софт, так и переносимость стендалонов между разными платформами с разными версиями Python.
Я решил рассказать о некоторых особенностях работы с этой библиотекой.
Сегодня о том, как установить и использовать Qt․py и что это вам даёт.
Установка
pip install Qt.py
Чтобы начать использовать Qt․py в коде достаточно заменить импорт вашего варианта Qt-биндинга на Qt․py
from [PySide|PyQt4|PySide2|PyQt5] import QtWidgets
=>
from Qt import QtWidgets
Теперь ваш код будет поддерживать любой вариант биндинга Qt в Python.
При этом не потребуется использовать if-else конструкции под разные версии. Все вызовы теперь одинаковы.
Всё что нужно сделать, это написать его по правилам PySide2. Именно эта версия была взята за основу.
Приоритет импорта такой:
1. PySide2
2. PyQt5
3. PySide
4. PyQt4
Что именно загрузилось можно посмотреть в переменной __binding__
>>> import Qt
>>> Qt.__binding__
'PySide2'
Приоритет имопрта можно изменить через переменные QT_PREFERRED_BINDING и QT_PREFERRED_BINDING_JSON. Причем под каждый проект оверрайды можно настраивать индивидеально.
#qt#libs
A whale sent 75 $BTC ($5.08M) and bought 2.067B $PUMP ($4.04M) from #Wintermute in the past 20 hours.
Address: 24BLFjSAcUPPWs8F7nhwthfRPvh5mopNYfu5WXTkLChr
https://x.com/OnchainLens/status/2031221755700981916
Follow @OnchainLens for more Onchain Updates.
The whale "0xFB7" has further bought 10,000 $ETH for $26.36M from #WinterMute.
This brings the whale's holdings to 120,169 $ETH, valued at $294.79M in staking.
Address: 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3
https://x.com/OnchainLens/status/2017765248162488573
Follow @OnchainLens for more Onchain Updates.
The whale "0xfb7" closed a $BTC long position with a loss of $3.7M, withdrew all the funds, and deposited $31.7M $USDC into #Wintermute and bought 10,000 $ETH Later converted it into $stETH, and sent it to another wallet where the whale holds 40,060 $stETH…
$NEIRO (Neiro Ethereum) seems to be in an accumulation phase according to our latest on-chain data:
1/ Whale 0x6ab accumulated 17.7M $NEIRO in the last 7 days at an average price of $0.086.
2/ Whale 0x9Ba bought 17.5M $NEIRO on Sept 6 at $0.154. While profitable with $FET, this whale hasn’t fared as well with meme coins.
3/ Whale 0xAB5 accumulated 6M $NEIRO, DCAing over the past month at $0.128, having made good profits with $PEPE in the past.
4/ Whale 0x1ED accumulated 8.6M $NEIRO at $0.116, has sold some without profit, and now holds 5.6M. It has previously profited from $ETHFI, $SYN, and $PENDLE.
5/ Lastly, #Wintermute, a market maker, continues to hold a large amount of 52.97M $NEIRO ($4.97M), ~5.3% of the total supply.
With a market cap still under $100M and recent signs of increased decentralization in the past weeks, will Binance consider listing it on spot after all 🧐?
Details: https://x.com/spotonchain/status/1839596800031998301
Whales/Institutions are accumulating $ETH - A newly created wallet "0xcA0" bought 61,000 $ETH worth $171.15M from #Binance. - The whale "0xFB7" further bought 20,000 $ETH worth $56.13M from #WinterMute and now holds 100,130 $ETH worth $283.79M. Addresses:…
Whales/Institutions are accumulating $ETH
- A newly created wallet "0xcA0" bought 61,000 $ETH worth $171.15M from #Binance.
- The whale "0xFB7" further bought 20,000 $ETH worth $56.13M from #WinterMute and now holds 100,130 $ETH worth $283.79M.
Addresses:
- 0xcA08371f6e9204Dd6927dcc2dB5504EA062b2998
- 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3
https://x.com/OnchainLens/status/2015582948632965245
Follow @onchainlens for more onchain updates
Multisign 0xbba (likely @MakerDAO) deposited the last 628 $MKR ($1.76M) to #Binance via wallet 0x1cc 8hrs ago!
Over the past 4 months, this multisign deposited all 30,971 $MKR to Binance and #Wintermute at ~$2,972 ($92M), causing price dips each time.
While multisign 0xbba is now out of $MKR, another likely multisign 0x7fd of MakerDAO, which once used wallet 0x1cc, may soon unload its current 5,177 $MKR ($15.1M).
Follow @spotonchain and check out the mentioned addresses at:
1. 1. Multisign 0xbba: 0xbba4c8eb57df16c4cfabe4e9a3ab697a3e0c65d8
2. Multisign 0x7fd: 0x7fda46250dbc2eb3a24d11374dd1380ce69e75e4
The whale "0xFB7" has further bought 15,642 $ETH ($36.24M) and 10 $cbBTC ($777.58k) from #WinterMute and #Coinbase. This brings the whale's holdings to 135,822 $ETH, valued at $313.55M. Address: 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3 https://x.com/…
The whale "0xFB7" has further bought 15,642 $ETH ($36.24M) and 10 $cbBTC ($777.58k) from #WinterMute and #Coinbase.
This brings the whale's holdings to 135,822 $ETH, valued at $313.55M.
Address: 0xFB78AA8F38843629e89951D9db6FdC398d75e0A3
https://x.com/i/status/2018123212178239573
Follow @OnchainLens for more Onchain Updates.
A whale withdrew 2,218 $ETH ($6.52M), 37.1M $SKY ($2.36M), and 4,772 $AAVE ($730.36K) from #Kraken 7 hours ago.
The wallet received 519 $ETH ($1.62M) from #WinterMute 19 days ago. In total, it holds 2,738 $ETH ($8.07M).
Address: 0xcd9eb5783e2620762f47bf0a7d09c531225b5507
https://x.com/OnchainLens/status/2005439635170721971
Follow @onchainlens for more onchain updates
The whale "0xfb7" has further bought 10,000 $ETH ($28.9M) from #WinterMute and also sent $58.13M to #FalconX likely to buy more $ETH. The whale now holds 60,098 $ETH, worth $179.22M. Addresses: - 0xfb78aa8f38843629e89951d9db6fdc398d75e0a3 - 0xd4584bf98…