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

Резултати

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

Пребарај: #injustice

当前筛选 #injustice清除筛选
Hong Kong Democracy Movement

@hkdmovement · Post #7321 · 12.04.2024 г., 10:56

The recent verdict on the Yuen Long 7.21 attack in Hong Kong is deeply flawed and raises concerns about the fairness of the court system. The court's attempt to change the historical narrative and accuse the victims is troubling. It disregards self-defense and the premeditated actions of the aggressors, mischaracterizing defenders as rioters. The verdict fails to acknowledge the right to protect oneself and others. This development undermines justice and distorts the truth. #YuenLongAttack#FlawedVerdict#Injustice#HongKongCourt

Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3926 · 23.01.2025 г., 18:08

Dr. Omar Nashabe exposes the chilling truth about what’s really happening to Palestinian detainees in Israeli prisons. #PalestinianDetainees#HumanRights#Palestine#Torture#PalestinianRights#Apartheid#Injustice#OmarNashabe

Hong Kong Democracy Movement

@hkdmovement · Post #7918 · 18.12.2024 г., 03:55

在元朗襲擊事件五年後,前立法會議員林卓廷及其他六名被告今日(12日)在區域法院被裁定暴動罪成。法官陳廣池的判決引發爭議,他被指出故意改變事件敘述,將受害者置於不利地位,將他們送入監獄。 林卓廷在事件中履行自己的職責,努力了解警方為何未能及時出現,並未違法。然而,法官的判決卻顯示出其腐敗,似乎受到中國共產黨的影響,從上到下違反法律。 這一判決不僅是對受害者的不公正對待,更是對法治的嚴重挑戰。 #721裁決#林卓廷#暴動罪#不公正#法治危機 After five years since the Yuen Long attack, former Legislative Council member Lam Cheuk-ting and six co-defendants have been found guilty of riot charges today (12th) in the District Court. Judge Chan Kwong-chi's ruling has sparked controversy, with accusations that he deliberately altered the narrative to put the victims behind bars. Lam Cheuk-ting was doing his job by seeking to understand why the police did not respond in a timely manner and acted within the law. However, the judge's decision reveals corruption influenced by the Chinese Communist Party, breaking the law from top to bottom. This ruling not only represents an injustice to the victims but also poses a severe threat to the rule of law. #721Verdict#LamCheukting#Injustice#RuleOfLaw

Hong Kong Democracy Movement

@hkdmovement · Post #7911 · 23.11.2024 г., 19:57

在判刑前夕,前港督、香港監察贊助人彭定康發表聲明,形容47人案是港府對香港人的侮辱,也是對全球珍視權利和自由的人的侮辱。他譴責該案件在沒有陪審團的情況下作出的「虛假判刑」,並揭示了香港集會、言論和新聞自由的破壞。 我們必須繼續為民主和自由而戰,捍衛每一位政治犯的權利! #彭定康#47人案#民主派初選#國安法#顛覆國家政權#政治犯#欲加之罪#冤獄#莫須有#初選無罪#釋放政治犯 圖片來源 @rfacantonese Chris Patten’s Support for Hong Kong Democracy On the eve of sentencing, former Governor of Hong Kong and patron of Hong Kong Watch, Chris Patten, issued a statement describing the 47-person case as an insult to the people of Hong Kong and to all who value rights and freedoms globally. He condemned the "sham convictions" made without a jury, revealing the destruction of assembly, speech, and press freedoms in Hong Kong. We must continue to fight for democracy and freedom, defending the rights of every political prisoner! #ChrisPatten#47PersonCase#ProDemocracyPrimary#NationalSecurityLaw#Subversion#PoliticalPrisoners#FalseCharges#Injustice#Unfounded#InnocentInPrimaries#FreePoliticalPrisoners Photo credit to @rfacantonese