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

Пребарај: #specialoperation

当前筛选 #specialoperation清除筛选
International News

@intnewsagency · Post #9334 · 17.04.2026 г., 05:23

Key Update at 08:00: International Agenda and Security Pulkovo airport halts flights due to a drone attack, highlighting rising regional security threats. Russian drones strike Ukrainian targets amid ongoing special operations. The US delays arms deliveries to Europe, focusing on tensions with Iran. A major success: the launch of the Soyuz-2.1b rocket from Plesetsk carrying military satellites, boosting national defense. “Security remains a priority in challenging times.” #Russia#Security#InternationalNews#Pulkovo#SpecialOperation The main news of Russia and the world ishere.

International News

@intnewsagency · Post #8930 · 26.03.2026 г., 10:08

Russian Defense Ministry: Advances and Strengthened Positions in Ukraine The Southern, Central, and Western groups have improved their positions, while the Eastern group pushed deeper into Ukrainian defenses. The village of Shevyakovka in Kharkiv region is now under control. Russian forces struck energy, transport, and drone boat production facilities. Russian air defenses destroyed 439 Ukrainian drones in 24 hours. “The operation continues successfully, reinforcing our troops’ positions on key fronts.” #DefenseMinistry#Ukraine#SpecialOperation#AirDefense#Shevyakovka The main news of Russia and the world ishere.