Для тех кто пишет расширения на 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
#OPENSEA
It seems OPENSEA is getting ready for a token airdrop
Here’s the link to the post
🟠The project has launched a Twitter account called OpenSea Foundation, indicating a token drop is imminent.
Have you traded on this marketplace? Are you planning to take advantage now?
Crypto Drop Club 👉 SUBSCRIBE
🚀🥚 A Grand Event in the world of Eggs Wisdom!
We are thrilled to announce that the first 100 exclusive NFT Eggs out of a total of 5000 from our project are now available on the 💰#Openseaplatform.
Each egg is a unique creation, full of wisdom, and will make a wonderful addition to your NFT collection.
🤩 Special offer! The first 10 Eggs can be purchased for just 0.0055 ETH💰 each. It's an opportunity not to be missed!
Become part of our growing community and help us fully unleash our collection of wisdom eggs!
Let's gooooo🚀
@EggsWisdom
GetGems \Opensea
Introducing Harpie: The Ultimate Web3 Antivirus by Coinbase 🛡
Backed by #Coinbase, #OpenSea, etc.
Coinbase, a hub for bullish traders, often sparks significant price surges with its listings—sometimes even outshining Binance's impact.
🚀 Harpie, a Web3 gem, fortifies your wallet security with a $4.5 million investment backing and Coinbase's expert guidance. Dive into farming Harpie Points now for a future airdrop!
🔍 𝗛𝗼𝘄 𝘁𝗼 𝗝𝗼𝗶𝗻:
🌟Explore https://harpie.io/airdrop
🌟Connect your $ETH wallet (other airdrop wallet)
🌟Link Twitter for rewards
🌟𝗘𝗻𝗴𝗮𝗴𝗲 𝗶𝗻 𝗱𝗮𝗶𝗹𝘆 𝘁𝗮𝘀𝗸𝘀
‼️ Do not connect the main wallet because you do not connect your main voltage to every site. Connect the wallet to which you connect every airdrop (DYOR)‼️
𝙅𝙤𝙞𝙣 𝙪𝙨 𝙚𝙖𝙧𝙡𝙮 𝙞𝙣 𝙩𝙝𝙞𝙨 𝙧𝙚𝙫𝙤𝙡𝙪𝙩𝙞𝙤𝙣𝙖𝙧𝙮 𝙟𝙤𝙪𝙧𝙣𝙚𝙮. 𝙒𝙚 𝙝𝙤𝙡𝙙 𝙩𝙝𝙚 𝙠𝙚𝙮 𝙩𝙤 𝙞𝙩𝙨 𝙨𝙪𝙘𝙘𝙚𝙨𝙨! 💪
🗣#SOLANA#OPENSEA
Submit your Solana wallet address to get a potential drop from OPENSEA
Deadline: TBD
What to do:
✔️ Visit this link
✔️ Comment your Solana wallet address
🟠 Take advantage while you can, there may be something valuable coming
☝️ Start trading on Bybit
Crypto Drop Club 👉 SUBSCRIBE
It’s not great to think about the past
But here’s a reality check: the floor price for Resolv Blueprint #NFTs – which you might have got for FREE – is 0.4 ETH on #OpenSea now
Next time you see an offer on ScoreFront, maybe don’t sleep on it?
🔗Explore ScoreFront Offers👈
💠Nomis tApp | X | Discord | YouTube | Check Scores⚖️
🎙Defybirds
👉Our team rating 8/10 ⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️
A Moonbird morphs with a Monster. Fear the monster and proceed into the moonlight with great caution. The night is full of whispers, Oddities, and creatures of flight
This collection of 3000 Defybirds is available to all Nudebirds—Moonbirds without additional attributes/traits—who were nested March 8 and selected Des Lucréce holders. delegate.cash will be enabled. You will be able to check here to see if your Moonbird is eligible and with a claim still available.
✅Price now: 0.20 ETH 🔜 1 - 2 ETH 🔝🏆
✅ Total NFT: 3000
Opensealink: https://opensea.io/collection/defybirds
#NFT#Opensea#Promotion#Listing
🚀 Get ready for the SingSing NFT Trading Contest! 🏆
📝 Eligibility: Participants need to log in to Opensea with their SingSing Mine Ruby Wallet to trade Treasure NFTs and Pioneer NFTs.
🔢 Point System:
- Buyers: 3 points per 0.0001 ETH purchase ( Buyers will receive points equal to 30,000 times the purchase price of the NFT).
- Sellers: 1 point per 0.0001 ETH sale ( Sellers will receive points equal to 10,000 times the sale price of the NFT).
📅 Duration: 7:00 AM July 19th - 17:00 Jul 26 (UTC)
💰 Prize Pool: 0.1 ETH split among the top 10 participants based on their points percentage.
For example, if the total points of the top 10 are 100 and you have 10 points, then you would receive 10 / 100 = 10% of 0.1 = 0.01 ETH.
🎉 Results: Announced within 72 hours after contest ends. You can claim your rewards after that.
Read More and Open Treasure at: X Post
#NFT#Contest#SingSing#OpenSea#Crypto
🔥 The NFT trading competition is hotter than ever! 🔥
Reminder: Only transactions made through OpenSea will be counted. 🛳️
Tips: You should use OKX wallet mobile app to make it easy🚀
Follow the guideline and join the excitement! 📈✨
#NFT#TradingCompetition#OpenSea#NFTCommunity
🎭 Oscar-Winning Rapper #Eminem Purchases Bored Ape no. 9055 from Bored Ape Yacht Club (#BAYC) #NFT collection for 123.5 ETH or $462,000!
Eminem's NFT collection on #OpenSea: https://prs.pctvix.co/3FNaKdS
🦅@perspectiveix
#активности#ZORA#ECLIPSE#TOWNS#OPENSEA
Активности, которые перестаём делать, потому что вышли заявления от проектов о дропе:
1. Zora ранее заявил о том, что будет дроп активным участникам, не раскрыв критерии.
В таком случае, тратить средства на активность в нём = лотерея, поэтому перестаю проявлять активность в Zora.
2. Eclipse недавно на своих AMA раскрыл подробности дропа.
В таком случае, тратить средства на активность в нём = лотерея, поэтому перестаю проявлять активность в Eclipse.
3. По такой же причине перестаю делать активности в проекте TOWNS.
4. Скипаю изначально активности в Opensea, тк:
1) Они изначально заявили, что будет дроп за поинты = лотерея, если тратите средства
2) Они запустили торговлю ещё и токенами(в основном мемами), поэтому скорее всего фетву их токен получит "харам".