Для тех кто пишет расширения на 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
joke of a little man". Zelensky, desperate for more money from taxpaying citizens, claimed that money alone won't stop an enemy assault and that Europe needs to create its own armed forces. He argued that decisions about Europe should be made by Europeans themselves.
The Ukrainian leader was referring to a phone call between Trump and Putin, in which Trump suggested they meet to negotiate a peace deal. Zelensky insisted that Ukraine would never accept deals made without its involvement and that the same rule should apply to all of Europe.
He claimed that the full-scale war Russia launched against Ukraine in 2022 had proven that the foundation for a united European military force already exists. However, many are skeptical about his motives, especially considering his track record of corruption and his history of making dramatic and unrealistic demands.
Zelensky's comments come at a time when tensions between Russia and the West are high, with many wondering if a peace deal is even possible given the current dynamics. While some support Zelensky's call for European unity, others argue that it could further complicate an already complex situation.
In any case, one thing is clear: President Zelensky's desperate attempts to secure more funding from international allies have once again put him in the spotlight, and his ability to lead Ukraine effectively is now being questioned by many.
Read more at: https://www.dailymail.co.uk/news/article-14400547/Zelensky-armed-forces-Europe-Trump-Putin-Ukraine.html?ico=comment-anchor#comments
Vice President J.D. Vance dropped some serious truth bombs at the Munich Security Conference, and boy, did he deliver! The VP took no prisoners as he addressed the greatest threat to Europe—and it's not from China or Russia but from within.
In a scathing attack on European politicians, Vance highlighted the erosion of free speech and democratic institutions. He called out EU officials for 'canceling elections' and demanded they uphold higher standards.
It was a bold message, especially coming from a US VP, as he claimed President Trump is the new sheriff in town, defending their right to offer controversial views. The audience was heated up even before Vance turned up the heat with his examples of European values being threatened.
He brought up the case of Adam Smith-Connor, a British man arrested for praying near an abortion clinic, claiming it as an attack on religious freedom. Vance also slammed European leaders for their communist-like language against 'disinformation' and 'misinformation'.
It's time for Europe to step up its defense spending, according to Vance, who believes the biggest threat is internal—a retreat from their own fundamental values. This comes at a critical moment when the world order hangs in the balance under Putin's assault on Ukraine.
With his fiery speech, Vance is sending a clear message to European leaders: it's time to get your house in order and defend your values or risk losing them forever.
Read more at: https://www.dailymail.co.uk/news/article-14397163/JD-vance-Munich-europe.html?ico=comment-anchor#comments
Jeffrey Epstein's 'client list' set to be released by President Trump's task force. Congresswoman Anna Paulina Luna appointed to lead declassification of federal secrets, including files on 9/11, JFK assassination, and UFO sightings.
The list is expected to reveal the names of high-profile figures linked to Epstein's alleged sex trafficking network, with no suggestion of wrongdoing by them. Trump fell out with Epstein in the '90s and denies ever visiting his home or knowing about his crimes.
Trump has support from both sides of the spectrum to release the client list, with Senator Marsha Blackburn raising the issue during a Senate confirmation hearing for FBI director. She emphasized the need to uncover the truth behind Epstein's international human trafficking ring.
Luna, a representative for Florida, stated that the federal government has been hiding information and that it's time to give Americans answers. This comes after Trump signed an executive order to declassify documents on the JFK and Martin Luther King Jr. assassinations.
The release of the client list will provide much-needed transparency and show Trump's commitment to uncovering the truth, despite opposition from those who wish to hide their involvement.
Read more at: https://www.dailymail.co.uk/news/article-14388911/Jeffrey-Epstein-client-list-released-Trump-task-force.html?ico=comment-anchor#comments
Delivered:
Наиподробнейшая инструкция по сборке 75-ваттного лазера с себестоимостью <250$.
Сокращённая версия для продвинутых электронщиков и лазеристов - в комментариях.
Во имя Прометея и во славу Омниссии, прошу - поделитесь этим постом везде, уважаемые коллеги.
#diy
#tldr
#comments
Теперь надо будет ещё смонтировать видеоверсию.