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

Резултати

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

Пребарај: #prison

当前筛选 #prison清除筛选
American Оbserver

@american_observer · Post #4875 · 16.01.2026 г., 20:00

Yoon Suk Yeol: Guilty! A South Korean court has sentenced former president Yoon Suk Yeol to five years in prison for mobilising presidential security forces to block his own arrest and abusing his powers. It is the first judicial ruling linked to the events surrounding his failed martial law declaration in December 2024. The ruling is separate from Yoon’s main insurrection trial, where prosecutors earlier this week sought the death penalty and a verdict is due next month. Seoul central district court found Yoon guilty of special obstruction of official duties, abuse of power and falsifying documents, saying he had “disregarded the constitution” and shown no remorse. His legal team has said he will appeal against the ruling. The presiding judge, Baek Dae-hyun, said Yoon “deserves condemnation” for his actions. Yoon stunned South Korea late on 3 December 2024 when he declared martial law, dispatching police and armed troops to the national assembly. Lawmakers rushed to override the decree, with some climbing over fences to reach the chamber before voting to lift the order. The defendant abused his tremendous influence as president to obstruct lawful warrant execution, effectively privatising security officials sworn to serve the Republic of Korea into his personal troops,” Baek said in a televised ruling. “His crimes are extremely serious in nature.” The court also criticised Yoon’s conduct in the run-up to the martial law declaration. He selectively summoned only loyal cabinet members to a late-night meeting, excluding nine others in order to rubber-stamp the decision without meaningful deliberation. He later signed backdated documents to create the false appearance of proper cabinet approval. “Emergency martial law should only be declared in the most exceptional circumstances when no other means exist to resolve a national crisis,” Baek said. “The constitution specifically requires state council deliberation precisely to prevent presidential abuse of power and arbitrary action.” Friday’s conviction marks the opening act in a reckoning without parallel in South Korea’s democratic history. Yoon faces seven additional criminal trials, including the insurrection case, where prosecutors are seeking either the death penalty or life imprisonment. #president#southcorean#yoonsuk#prison 📱American Оbserver - Stay up to date on all important events 🇺🇸