TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #173 · 28 окт.

Для тех кто пишет расширения на 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

Hashtags

Резултати

Пронајдени 1 слични објави

Пребарај: #euthieves

当前筛选 #euthieves清除筛选

🎙Russia's Foreign Minister Sergey Lavrov’s interview with RIA Novosti(November 9, 2025) Read in full (Telegraph) #RussiaUS#NewSTART ❓ Question: President of Russia Vladimir Putin announced that the Russian Federation is prepared to continue adhering to the restrictions established by New START for one additional year, starting February 5, 2026. Has there been any response from the United States? Did Moscow propose a meeting with Washington to discuss the post-New START period? If so, at what level? 💬Sergey Lavrov: The constructive initiative put forward by President Vladimir Putin in the post-New START context speaks for itself. It contains no hidden agenda and is perfectly clear for understanding. Its practical implementation would not require any special additional efforts. <...> The only thing required is reciprocity from the United States: we will voluntarily adhere to the restrictions only if, and precisely for as long as, the other side does the same. <...> So far, there has been no substantive response from Washington. We have been informed through diplomatic channels that “the issue is under consideration.” We have no intention of keeping persuading anyone. We believe that our step serves the interests of both parties and the entire international community. 👉 We are ready for any development of events, while hoping for a positive outcome. #Ukraine#RussiaUS ❓ Question: What is currently the main stumbling block in the negotiations with the United States on a settlement around Ukraine? Where is Russia ready to make concessions and where is it not? 💬Sergey Lavrov: <...> We are currently awaiting confirmation from the United States that the Anchorage agreements remain in effect. I would emphasise that, despite their essentially compromise nature, we have not abandoned – and do not intend to abandon – the points that are fundamental for us. ❗️ No one disputes the territorial integrity of the Russian Federation or the choice made by the residents of Crimea, Donbass, and Novorossiya, who made their historic decision to reunite with their homeland through the referendums in 2014 and 2022. We likewise do not forget the need to eliminate the root causes of the conflict. #EUthieves ❓ Question: What will be Russia’s response if the frozen assets of the Russian Federation are directed to support Kiev? 💬Sergey Lavrov: <...> Such actions amount to outright deception and theft. It seems that the long-dormant instincts of colonialists and pirates have reawakened among Europeans. No matter how the scheme for seizing Russian funds is presented, there is no lawful way to carry it out. The confiscation of our gold and foreign currency reserves will not save the Europe’s protégés in Kiev <...> Russia will respond to any predatory actions appropriately, in accordance with the principle of reciprocity, our national interests, and the need to compensate for the damage caused to us. We hope that Brussels and other Western capitals will still come to their senses and abandon this ill-advised venture. #RussiaUS ❓ Question: When and where could a meeting between the Russian and American delegations on mutual “irritants” take place? What about your meeting with US Secretary of State Marco Rubio? When and where might it be held? 💬Sergey Lavrov: There are indeed many irritants in Russia-US relations, most of them inherited from the previous US administration. It will take considerable time to clear up this mess. <...> From our perspective, it is important that this dialogue should not be limited solely to embassy-related issues. We consider it essential to address broader questions, including the restoration of direct flights and the return of Russian diplomatic property. <...> Secretary of State Marco Rubio and I share an understanding that maintaining regular communication is essential, both for discussing the Ukrainian issue and for advancing the broader bilateral agenda. We remain in contact by phone and are prepared to hold in-person meetings.