Для тех кто пишет расширения на 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
#Catholic bishops urge #Ethiopians to resist hatred, condemn violence against civilians
Addis Abeba – Ethiopia’s Catholic bishops have condemned acts of violence against civilians in various parts of the country and called on Ethiopians to resist hatred and reject attempts to deepen social divisions.
In a statement issued by the Catholic Bishops’ Conference of Ethiopia, the bishops deplored what they described as continued attacks and atrocities targeting innocent civilians, stressing that such violence cannot be justified by religious teachings, cultural traditions, or political reasons, Vatican News reported.
The bishops highlighted recent attacks reported in the Arsi Zone of Oromia Regional State, expressing concern over what they described as recurring violence in the area.
“We are deeply saddened by the heinous and inhumane killings and the destruction of property targeting innocent people…
https://www.facebook.com/share/1AS4phfuJc/?mibextid=wwXIfr
The Novus Ordo is a #Freemasonic sect that fights the #Catholic church & oposses the very foundations of all that #Christian & Holy with their leader at the helm.
Some who attend don't know any better but it still does not change the fact that until they are unplugged from that machine of anti-white anti-catholic teaching they are potentially an enemy that will turn on you the first chance they get.
The Novus Ordo leadership is the enemy and its members should be sought out for conversion for our worldview. If they refuse they are the also enemy.
Hoy Imploramos e Invocamos el Nombre sobre Todo Nombre, Aquel que subiendo a la Cruz, nos ha bajado el Cielo.
Te Adoramos Oh Cristo y te Bendecimos...
@TrilocosxJesus✨
#miljesus#cruz#catholic#trilocosxjesus#pascua
https://youtu.be/eEk8PNtqpuM?si=0awjTEaSxDI4qmyd
St Michael's Operations is a nonprofit organization of Catholic laymen that provides Church protection and emergency response, donates medical supplies to chapels and parishes, provides cost effective training and now provides humanitarian aid and the corporal works of mercy to our clientele and our countrymen. Primarily located in California and Arizona it has a branch pending in Wisconsin and is entering into negotiations for opening a Texas branch.
We have donated thousands of man hours, and thousands of dollars in equipment. We have protected rosary rallies during tense political standoffs in the vicinity. We have provided on scene BLS medical assistance on multiple occasions. We have removed multiple after hours trespassers, as well as removed those who have disrupted the Mass.
We are an all volunteer force and we depend on join fees, membership dues, Church sponsorship and the generosity of our fellow man in order to conduct operations. In Fiscal year 2023 we are looking to set up a fully functional disaster response team in order to help provide relief wherever tragedy strikes such what we saw with East Palestine, Ohio. Additionally we are looking to send three of our most dedicated volunteers to get some advanced hands on training with the EPS League's Hard Skills intensive. We want to sponsor them as much as possible so as to prevent undue financial burden on these good men. This training will go towards hardening the security posture of our chapels and parishes and give us the ability to provide proper protection to important members of the Ecclesiastical hierarchy such as the Bishops, especially during Holy Week.
If it is on your heart and you are disposed, please consider donating. You will of course receive a statement regarding your donation in order to write it off of your taxes.
Our current fundraising goal is a minimum of $20,000 by July.
God bless you and St Michael protect you. #fundraising#security#nonprofit#training#help#team#catholic#medical
https://venmo.com/code?user_id=3195413498691584121