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

TGINSIGHT SIMILAR POSTS

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

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

В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль QtCompat (compatibility). Там не так много функций но они довольно полезны. Этот модуль содержит унификаци модуля shiboken2, функций loadUi, translate и несколько переименованных функций классов или изменённую сигнатуру аргументов и возвращаемых значений. Это единственное исключение из правила когда вам потребуется где-то изменить свой код кроме импортов и этот код не похож на обычный код PySide2. Например, в PyQt4 и PySide есть метод QHeaderView.setResizeMode Для PyQt5 и PySide2 они были благополучно переименованы в QHeaderView.setSectionResizeMode Чтобы применить этот метод следует использовать такой код from Qt import QtCompath header = self.horizontalHeader() QtCompat.QHeaderView.setSectionResizeMode(header, QtWidgets.QHeaderView.Fixed) Унификация загрузки UI файлов: # PySide2 from PySide2.QtUiTools import QUiLoader loader = QUiLoader() widget = loader.load(ui_file) # PyQt5 from PyQt5 import uic widget = uic.loadUi(ui_file) # Qt.py from Qt import QtCompat widget = QtCompat.loadUi(ui_file) Хорошо что таких моментов не много и их легко запомнить. Полный список можно посмотреть в таблице. #qt#tricks

Hashtags

Резултати

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

Пребарај: #oscarawards

当前筛选 #oscarawards清除筛选
港島西。Channel

@islandwest84 · Post #39893 · 05.03.2023 г., 13:54

聯署要求取消邀請,支持打壓人權演員甄子丹,擔任奧斯卡金像獎頒獎嘉賓 Cancel inviting Donnie Yen who supports human rights abuses as a presenter for the Oscars. 請簽署支持及轉發 https://chng.it/YFPf7mVwdT Donnie Yen is a supporter of the Chinese Communist regime and has made several remarks in support of the Chinese government's policies, including supporting the implementation of the National Security Law in Hong Kong and accusing Hong Kong protesters of being rioters. These remarks not only violate the spirit of freedom of speech but also deny the rights of the people of Hong Kong to fight for their freedom and democracy. We demand that the Oscars Committee reconsider this decision and cancel the invitation of Donnie Yen as a presenter for the Oscars. Let us work together to uphold human rights and moral values, and make the Oscars a truly respectful award. #OscarAwards#聯署#petition#甄子丹#媚共偽人#殺神4#反送中運動#反修例#沒有暴徒只有暴政