Для тех кто пишет расширения на 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
EU Scrutinizes Bing's Generative AI over Potential Election Risks
The European Commission is escalating its investigation into potential risks associated with generative AI features on Microsoft's Bing search engine. The Commission seeks information beyond what Microsoft previously provided.
The request stems from concerns that Bing might be violating the Digital Services Act. This act outlines risk assessments and mitigation measures for online platforms, particularly regarding "hallucinations" (false information generated by AI systems), deepfakes (manipulated media), and automated manipulation of services that could mislead voters.
The Commission emphasizes the potential threats posed by generative AI to civic discourse and electoral processes, particularly in the upcoming European Parliament elections.
Microsoft has until May 27th to comply with the legally binding request. Non-compliance could lead to significant fines of up to 1% of Microsoft's global turnover, or daily penalty payments calculated as a percentage of average daily income.
#DSA
🇦🇿 Ozarbayjonda Best Startup Project yarim final bosqichi bo‘lib o‘tdi!
“Digital Startup Awards” (DSA) butun mintaqa bo‘ylab eng iqtidorli startap asoschilarini birlashtirishda davom etmoqda. 🌟
Dunyo bo‘ylab kelib tushgan 350 dan ortiq ariza orasidan 20 ta ozarbayjonlik startap o‘z innovatsion g‘oyalarini taqdim etdi. Natijada ikki finalchi — “Starkids” va “Tryverse” — joriy yil dekabr oyida Toshkentda bo‘lib o‘tadigan Grand Final bosqichiga yo‘llanma oldi. 🚀
Jarayon tobora qizg‘in tus olmoqda — yakuniy bosqichga yaqinlashar ekanmiz, yangiliklarni kuzatishda davom eting!
📖To‘liq maqolani o'qing: startupbase.uz
—
🇦🇿Azerbaijan Hosts Its Best Startup Project Semifinal!
The Digital Startup Awards (DSA) continues to bring together the brightest founders from across the region. 🌟
Out of 350+ applications globally, 20 startups from Azerbaijan took the stage to pitch their innovative ideas — and two finalists, Starkids and Tryverse, have earned their spot in the Grand Final in Tashkent this December. 🚀
The momentum is growing — stay tuned as we move closer to the final showdown!
📖Read the full article here: startupbase.uz
#DSA#BestStartupProject#ITParkUzbekistan#AzerbaijanStartups#CentralAsiaStartups
🇦🇿 Ozarbayjonda Best Startup Project yarim final bosqichi bo‘lib o‘tdi!
“Digital Startup Awards” (DSA) butun mintaqa bo‘ylab eng iqtidorli startap asoschilarini birlashtirishda davom etmoqda. 🌟
Dunyo bo‘ylab kelib tushgan 350 dan ortiq ariza orasidan 20 ta ozarbayjonlik startap o‘z innovatsion g‘oyalarini taqdim etdi. Natijada ikki finalchi — “Starkids” va “Tryverse” — joriy yil dekabr oyida Toshkentda bo‘lib o‘tadigan Grand Final bosqichiga yo‘llanma oldi. 🚀
Jarayon tobora qizg‘in tus olmoqda — yakuniy bosqichga yaqinlashar ekanmiz, yangiliklarni kuzatishda davom eting!
📖To‘liq maqolani o'qing: startupbase.uz
—
🇦🇿Azerbaijan Hosts Its Best Startup Project Semifinal!
The Digital Startup Awards (DSA) continues to bring together the brightest founders from across the region. 🌟
Out of 350+ applications globally, 20 startups from Azerbaijan took the stage to pitch their innovative ideas — and two finalists, Starkids and Tryverse, have earned their spot in the Grand Final in Tashkent this December. 🚀
The momentum is growing — stay tuned as we move closer to the final showdown!
📖Read the full article here: startupbase.uz
#DSA#BestStartupProject#ITParkUzbekistan#AzerbaijanStartups#CentralAsiaStartups
🇲🇳 Mongoliyada Best Startup Project yarim final bosqichi boshlandi!
“Digital Startup Awards” (DSA) dasturi qizg‘in davom etmoqda — Mongoliya rasman o‘zining ilk “Best Startup Project” tanlovini o‘tkazib, eng yaxshi finalchilarni saralab oldi! 🚀
350 dan ortiq arizalar orasidan UWISH va EGUNE Mo‘g‘uliston yarim finalida g‘olib chiqdi va joriy yilning dekabr oyida Toshkentda bo‘lib o‘tadigan Grand finalda ishtirok etadi.
📖To‘liq maqolani o'qing: startupbase.uz
—
🇲🇳Mongolia Kicks Off the Best Startup Project Semifinals!
The Digital Startup Awards (DSA) program is in full swing — and Mongolia has officially hosted the first Best Startup Project competition, selecting its top finalists! 🚀
Out of 350+ applications, UWISH and EGUNE became the winners of the Mongolian semifinal and will compete in the Grand Final in Tashkent this December.
📖Read the full article here: startupbase.uz
#DSA#BestStartupProject#ITParkUzbekistan#StartupEcosystem#MongoliaStartups#Innovation#Entrepreneurship#CentralAsiaStartups
🚀 AI TRENDS | OpenAI to Be Regulated Under EU's Digital Services Act, Sources Say
OpenAI is set to be regulated under the European Union's Digital Services Act (DSA), according to sources cited by Handelsblatt. The company will be classified as a very large online search engine under the new regulations. According to Jin10, this classification will subject OpenAI to stricter compliance requirements aimed at ensuring transparency and accountability in its operations. The DSA is part of the EU's broader effort to regulate digital services and platforms, enhancing user protection and addressing issues such as misinformation and data privacy. OpenAI's inclusion under this regulatory framework highlights the growing scrutiny of AI technologies and their impact on society.
#AI#OpenAI#EU#DigitalServicesAct#DSA#Regulation#TechPolicy#DataPrivacy#Misinformation#Transparency#Accountability