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 слични објави

Пребарај: #rememberserenashim

当前筛选 #rememberserenashim清除筛选
Marwa Osman/MidEaStream

@Marwa_OsmanLB · Post #3487 · 19.10.2024 г., 03:44

In times like these, when reporting news has become a tool in the hands of empire, brainwashing people into accepting genocide under the false pretext of a "right to self-defense" for occupying powers against native populations, we must remember the truth-tellers. As occupation forces target journalists in #Gaza with sniper fire and bomb journalists in Lebanon, we are reminded of the courage of those who dared to expose the lies. Today, we remember @PressTV 's Serena Shim, a Lebanese-American journalist, who passed on October 19, 2014, in least to say mysterious circumstances. Serena had uncovered and reported a truth that many wanted buried: the smuggling of Al-Qaeda terrorists from Turkey to Syria, hidden on WHO trucks, to bring devastation to a nation. Her work highlighted how the powerful manipulate narratives and use humanitarian fronts to cloak their actions. Serena's bravery stands in stark contrast to the silence of many today. At a time when the powerful seek to erase voices and twist facts, let us honor her memory by sharing the stories that the empire wants to suppress. Let us remember that truth is the first casualty of war—and that we must keep it alive, for Serena, for the journalists under fire, and for all who suffer in silence. #RememberSerenaShim#TruthMatters#StopGenocideNow #SerenaShim