Для тех кто пишет расширения на 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 deposited 2M $PIPPIN ($1.04M) into #MEXC, 16 hours ago, making a profit of $3.6M
The whale initially withdrew 7.56M $PIPPIN for $137K from #MEXC and still holds 2.03M $PIPPIN ($1.29M).
Address: Evee5RbYcc2Yhv6RajrA5epA9MCHuonAWu6dQYGPaC6f
https://x.com/OnchainLens/status/2022602547484332500
Follow @onchainlens for more onchain updates
#MEXC
Инвесторы массово выводят средства с биржи MEXC
Об этом предупреждает платформа CryptoQuant.
Ранее криптодетектив ZachXBT начал расследование касаемо возможного теневого владельца биржи MEXC по имени «Тони», личность которого якобы намеренно скрывается.
MEXC всегда была около-скамовой биржей. Наверное её решили добить конкуренты. Если держите средства на этой бирже, лучше вывести, на всякий случай.
Stake $USDT for 200% APR on MEXC!
The USDT Stake-to-Earn event is now live on #MEXC, your chance to grow your assets! Whether you’re just starting out or already an experienced trader, this is your moment to earn effortlessly.
🕰Event Period:
June 13, 2025, 10:00 (UTC) – July 13, 2025, 10:00 (UTC)
Event Details:
✅Exclusive to new users
✅Staking duration: 3 days
✅Estimated APR: 200%
✅Minimum individual stake: 100 $USDT
✅Maximum individual stake: 500 $USDT
📄Terms & Conditions available on the event page
📈Join MEXC via this link
🚨 Pre-market listing alert!
#MEXC will list $HOLD on the Pre-Market on Dec 7, 2024, at 8:00 (UTC). 🔥
Learn more: https://www.mexc.com/support/articles/17827791520305
🧐🧐 Two smart traders decided to sell their $LOOKS and hold $X2Y2 instead, is it a good strategy?
- One just moved all of his 7,3M $LOOKS ($1,9M) to #MEXC and keeps all of his $X2Y2
- Another just swapped 60% of his $LOOKS to $X2Y2
👉More details: https://twitter.com/spotonchain/status/1626976793076064257?s=20
⚡️TON Community: Exciting Opportunities During MEXC's TON Triumph Month
#TON#MEXC
TON Community announces the launch of the "TON Triumph" campaign on MEXC from May 21 to June 20, 2025. The campaign offers a $1,000,000 prize pool, zero trading fees, fee-free withdrawals, and various trading opportunities for Toncoin and USDe-TON users.
Source: link
@tonlines
#DYOR#MEXC
🚀Airdrop: LSVR by MEXC
💰Prize Pool: $800 Worth LSVR
🎁Winners: First 50 Users
🖥Distribution : After Event end
✅How to Claim 🚀Airdrop
🔹 Create a Account on Mexc Exchange Using this link
🔹 Deposit more than 100USD
🔹 Do trading of 500USD
🔹 You will receive 5000 LSVR(20USD) at Event end.
🔊Website: https://www.mexc.com
Disclaimer: Please do your own research before joining to any airdrops project. Don't send any fee or penny without doing Research.
🚨🚨 $LBR team (Lybra Finance) allegedly deposited 800K $LBR ($1.81M) to #OKX via 0x92d 7hrs ago, right before the CEX listed $LBR.
➡️ They also deposited another 50K $LBR ($118K) to #MEXC a day ago, via 0x5cc
⚠️ $LBR price has dropped 11.9% since the listing 2.5hrs ago.
👉 Visualizer: https://platform.spotonchain.ai/visualizer?id=1279
👉 Link to the full article: https://platform.spotonchain.ai/signal-details/lybra-finance-deposited-lbr-to-okx-right-before-listing-467
MEXC @MEXC_Official has supported the UXLINK Contract Swap.
Huge thanks for the swift action and continuous support to our community! 🙌
https://mexc.com/announcements/article/mexc-to-support-the-uxlink-uxlink-contract-swap-17827791530544
#Web3#UXLINK#MEXC
🔥🔥 Who managed to accumulate $MKR before the token hit its one-year high at $1,900 today?
Five fresh whales accumulated 23,891 $MKR ($38.1M) from #Binance, #Coinbase, and #MEXC at $1,593 on avg in the past 10 days leading the pump.
Their joint floating gain is $5.28M (+13.9%).
👉 More details: https://platform.spotonchain.ai/en/entity/1756
✅ Set alerts for $MKR with us now to avoid missing an opportunity: https://platform.spotonchain.ai/en/platform/token?name=MKR
RoOLZ Gods & Mortals: Exciting Updates Ahead
#SocialFi#MEXC
RoOLZ Gods & Mortals celebrates the distribution of SocialFi rewards from the last event, while addressing a listing issue on MEXC. Get ready for the upcoming May SocialFi event, focusing on viral videos and engagement, with details to come soon. Don't miss today's Comput3ai livestream at 12 pm ET.
Source: link
@tonlines
🚨#MEXC New Listing Alert!
📈 $HOLD/USDT will be listed in the Innovation Zone on 2024-12-16 13:00 (UTC).
In the crypto asset management simulator game #HoldCoin, which is based on Telegram, users can HOLD assets and create a portfolio to generate coins.
Details: https://www.mexc.com/support/articles/17827791520405