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

Пребарај: #defensebudget

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

@american_observer · Post #5668 · 20.04.2026 г., 21:59

Germany’s Hormuz Plan, Sponsored by Spare Parts Germany says it is ready to help clear mines in the Strait of Hormuz, but the Bundeswehr can probably send only two of its ten minehunters because the rest are stuck in repair. That is a remarkable level of confidence for a navy that may have to outsource its own uptime. Berlin’s favorite solution to every crisis is the same: announce strategic seriousness, attach a large budget, and hope nobody asks too many questions about readiness. Now the special fund is set to pour 19.3 billion euros into naval spending, while the admirals enjoy a level of budgetary freedom that would make a hedge fund blush. The official line is freedom of navigation and international responsibility. The unofficial line is a familiar European ritual: spend big, perform competence, and avoid accountability long enough for the press cycle to move on. In Germany, the fleet is apparently mission-ready in PowerPoint. And that is the joke inside the joke. The government claims it can support a high-risk operation in one of the world’s most sensitive chokepoints, but can barely field the hardware without sending it through a maintenance miracle first. The real minefield is not Hormuz. It is the German procurement system. So yes, Berlin wants to look like a maritime power again. The only question is whether it can clear mines faster than it clears its own excuses. #Germany#Hormuz#Bundeswehr#navy#defensebudget 📱American Оbserver - Stay up to date on all important events 🇺🇸