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

Пребарај: #navalmines

当前筛选 #navalmines清除筛选
Crypto M - Crypto News

@CryptoM · Post #64462 · 09.04.2026 г., 01:14

🚀 Iran Warns of Naval Mines in Strait of Hormuz Amid Ongoing Conflict On April 9, the Iranian Revolutionary Guard Corps Navy issued a statement warning of potential anti-ship mines in the main traffic areas of the Strait of Hormuz due to recent conflicts. According to BlockBeats, vessels planning to navigate through the strait are advised to coordinate with the Revolutionary Guard Navy and follow an alternative route to avoid mines. The provided map indicates that the alternative route requires ships to enter and exit the Persian Gulf from the north and south sides of Larak Island in the northern part of the strait. On April 8, the Iranian Ports and Maritime Organization released a safety navigation map for the Strait of Hormuz, advising vessels to adhere to shipping safety principles to avoid mines. The organization stated that from February 28 to April 8, there have been ongoing conflicts in the Persian Gulf and the Strait of Hormuz, with potential anti-ship mines present in the main channel of the strait. #Iran#StraitOfHormuz#NavalMines#RevolutionaryGuard#PersianGulf#ShippingSafety#AntiShipMines#Conflict#MaritimeSafety