Для тех кто пишет расширения на 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
News: #Amnesty flags impunity, forced eviction, and shrinking civic space in #Ethiopia’s 2025 human rights record
Amnesty International has raised alarm over ongoing human rights violations in Ethiopia, citing entrenched impunity, continued armed conflict, and a tightening grip on civic space throughout 2025.
“Impunity for past and ongoing violations persisted,” Amnesty said, pointing to systemic failures to investigate and prosecute abuses.
https://addisstandard.com/?p=56612
📰 NEWS | Venezuela: Rodríguez Hosts US Chargé d’Affaires Dogu in Presidential Palace
Venezuelan Acting President Delcy Rodríguez hosted US Chargé d'Affaires Laura Dogu in Miraflores Palace on Monday.
The meeting capped a lightning-fast diplomatic rapprochement following the January 3 US strikes and kidnapping of President Nicolás Maduro.
Days earlier, Rodríguez announced plans for an "amnesty law" to promote peace and coexistence in the country.
Follow the link to read the report: https://venezuelanalysis.com/news/venezuela-rodriguez-hosts-us-charge-daffaires-dogu-in-presidential-palace/
#Diplomacy#Amnesty#DelcyRodríguez#Imperialism
#Ethiopia: OLA outlines factual error in #Amnesty report; calls for independent investigation
The Oromo Liberation Army (#OLA) has rejected findings of a recent report by Amnesty International accusing its fighters of gang rape and sexual slavery against women in #western_Oromia, alleging that the report contains “serious methodological flaws and factual errors,” and calling for an independent investigation into abuses committed in the region.
In a press release issued on 06 March, the OLA said that while it condemns all forms of gender-based violence and supports efforts to document abuses against civilians, Amnesty’s report titled “No One Came to My Rescue” suffers from investigative shortcomings & fails to conclusively identify the perpetrators of the crimes described.
The armed group argued that Amnesty itself acknowledged in the report that it could not verify the identities of the alleged perpetrators at the time of publication, a point the OLA said..
Read more: https://addisstandard.com/?p=55634
Dear Members,
You would observe that NIDO Russia has not taken part in disseminating any news on amnesty. Observant people have called privately to inquire and we have guided them as usual. Some have taken matters into their hands and are suffering the consequences, not one, not two. Please before you rush, it may be useful to contact executives in the organisations that you belong. Don't fall prey to ambiguity.
A word is enough for the wise.
Have a beautiful day ahead!
Dr. Godwin Ibe
https://t.me/nido_russia/1936
#migration#nidorussia#amnesty#Nigeria#russia
#Ethiopia: OLA fighters accused of gang rape, sexual slavery against women in #Oromia, Amnesty report
#Amnesty International has accused fighters of the Oromo Liberation Army (#OLA) of committing gang rape, sexual slavery, and other abuses against women and girls during the ongoing armed conflict in Ethiopia’s Oromia region, warning that the violations have contributed to mass displacement and long-term trauma for survivors.
In a new briefing titled “No One Came to My Rescue: Gang Rape, Sexual Slavery, and Mass Displacement of Women in Oromia, Ethiopia,” the rights group said it documented 10 cases of sexual violence in the #Sayo and #Anfillo districts of #Kellem_Wallaga zone, areas it described as strongholds of the OLA.
Amnesty said that the conflict between the OLA and Ethiopian government forces — including the #ENDF, Oromia #Special_Police, Oromia regional police, and local militias — meets the threshold of a non-international armed conflict under .....
Read more: https://addisstandard.com/?p=55611