Для тех кто пишет расширения на 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
Видели эти кроссовки #Botter с парижской недели моды?
Кроссовки ещё не вышли в продажу, но я вот узнала, что с 2020 года бренд участвует в финансировании коралловой фермы и способствует выращиванию новых кораллов и моллюсков, чем собственно и вдохновлялись при создании этой модели.
Как круто! 🥺
Вариантик конечно не самый носибельный, но очень #ecofriendly
Ура! В торговом центре «Фуд Сити» появился настоящий оазис — аппарат по продаже питьевой воды высокого качества. 💦
Сама вода проходит 10 ступеней фильтрации (фильтры из кокосового угля обеспечивают идеальные вкусовые свойства питьевой воды) и обогащена полезными элементами: магнием, кальцием, калием и йодом💪. По многим показателям свойства воды близки к талой.
И самое классное — вы можете набирать воду в свои бутылки!
Экономия и забота о природе в каждой покупке 🌍💧.
Еще одна отличная новость - целый месяц действует акция:
1 литр — всего 4 рубля
5 литров — 20 рублей
Аппарат расположен в ТЦ «Фуд Сити», вход 8.
#репортаж_фудсити#питьеваявода#ecofriendly
🌱 Going Green: Planting Trees and Promoting Sustainable Living in the Go! Game 🌍🌳
Hello Go! Community,
We're excited to share our latest eco-friendly initiative within the Go! Game: The "Plant a Tree" Quest! 🌱🚶♂️
🌿 How It Works 🌿:
For every 25,000 steps you complete, the Go! Project will plant a real tree in partnership with organizations dedicated to reforestation and sustainable living. 🌳 It's a fantastic way to make your wellness journey even more impactful!
🌿 Why This Matters 🌿:
Environmental Impact: Together, we're reducing our carbon footprint and contributing to a healthier planet.
Motivation: Planting a tree adds an extra layer of motivation to hit your step goals.
Real-World Impact: Beyond personal wellness, you're making a real, tangible difference in the world.
🌿 How to Join 🌿:
➡️ Open the Go! app and make sure your step tracker is connected.
➡️ Sync your step tracker and start walking!
➡️ For every 25,000 steps, you'll be notified of the tree planted in your name.
Are you ready to step up your wellness journey while contributing to a greener, healthier Earth? 🌏👣 Join on https://chat.goplatform.io now! 🌍🌱
#PlantATree#SustainableLiving#EcoFriendly🚶♀️🌳
Thinking about Father's Day plans? Why not organise a memorable picnic? Here are some tips to make it fun and eco-friendly. #FathersDay#EcoFriendly#Picnic#SayYEStoWasteLess
🍀Build Sustainable Cities with Mappasaurus!🌐
🪄Empower Eco-Friendly Urban Planning:
⏺Optimize Resources: Utilize our maps for efficient resource allocation and green urban projects.
⏺Smart Routing: Reduce emissions with AI-driven routes that minimize travel times and fuel usage.
🦖Why MappaSaurus❓
⏺Enhance Urban Resilience: Support sustainable development that adapts to environmental challenges.
⏺Encourage Community Involvement: Use transparent mapping to foster public participation in urban planning.
⚔️Shape Greener, Smarter Cities with Us
⏺ See how Mappasaurus leads the way in eco-friendly urban planning.
💯#Mappasaurus#SustainableCities#UrbanPlanning#EcoFriendly#SmartCities
🌿🌍 Сенбілік уақыты өтті! 🌍🌿
📢 05.04.2025 күні, сағат 10:00-де Біргеміз волонтерлық ұйымы өткізген “JOIN US” тазалық акциясы сәтті өтті! 🗑
Тазалық акциясында әрбір қатысушы өз үлесін қосып, қоршаған ортаға қамқорлық танытты. Біз бірлесе отырып, жерімізді таза әрі жасыл ету жолында тағы бір қадам жасадық✨
Барлық қолдау көрсеткендерге шексіз алғыс айтамыз! Жасыл болашақ үшін бірге жұмыс істейік! 🌎💚#bizbirgemiz#сенбілік#тазақала#ecofriendly
🌿🌍 Сенбілік уақыты келді! 🌍🌿
📢 Біз Біргеміз волонтерлық ұйымы 5 сәуір, сенбі күні сағат 10:00-де “JOIN US”тазалық акциясын өткізеді! 🧹🗑
Жерімізді таза ұстау – біздің ортақ міндетіміз! 🤝🏻💚 Бізге қосылып, табиғатқа өз үлесіңді қос! 🌱✨
⏳ Күні мен уақыты: 05.04.2025 | 10:00
Жасыл болашақ үшін бірге әрекет етейік! 🌎💚#bizbirgemiz#сенбілік#тазақала#ecofriendly
Latvenergo Announces New Round Funding
Latvenergo, a leading energy trader and eco-friendly producer in the Baltic states, has announced a funding round of $241.50M scheduled for December 18, 2024. For more information, visit their official site here.
#Latvenergo#Energy#Funding#Baltics#EcoFriendly#Investment
Changing your font can actually save printer ink! 🖨️💸
Switching to fonts like Ecofont or Century Gothic uses up to 30% less ink than standard fonts like Arial or Times New Roman. The tiny holes in the letters make a big difference!
[Read more]
@googlefactss#PrinterHack#SaveInk#LifeHack#EcoFriendly
Alkaline hydrolysis, also called water cremation, biocremation, resomation, flameless cremation, or aquamation, breaks down the body using water, lye, and heat. Bones are dried and crushed into ashes. The liquid is sterile, treated in wastewater systems, and eventually enters rivers, lakes, or irrigation, returning nutrients to the environment. It uses less energy than flame cremation and produces no air pollution.
💧🦴⚗️🌱
[Read more]
@googlefactss
#WaterCremation#AlkalineHydrolysis#EcoFriendly#FuneralFacts#DidYouKnow
Sherbet Raises $2.02M for Taxis
Sherbet Electric Taxis secures $2.02M in funding as of December 16, 2024. The company aims to promote eco-friendly transportation in London with its iconic black electric taxis.
Learn more: Sherbet London
#EcoFriendly#ElectricTaxis#London#Funding#Transportation#Sustainability
Filtered water is home filtered tap water, removing harmful things. Bottled water often comes from tap water or has the exact same source (depending on the area) and costs about $500–$800 a year for a family. Tap water for drinking costs only a few dollars a year. Plastic bottles create waste and hurt the environment. Filtered water is cheaper, better for the planet and if you don't care about the planet, its also good for your wallet. 🌍🚰
[Read more]
@googlefactss
#FilteredWater#BottledWater#EcoFriendly#SaveMoney#CleanWater