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

Пребарај: #h2nomics

当前筛选 #h2nomics清除筛选
Decarbonization in Asia

@decarbanization_asia · Post #2141 · 21.04.2026 г., 11:57

Repost of the publication 🇨🇳Hydrogen notes from China: hydrogen is everywhere #H2nomics#international A final travel note from Igor Chausov and Pavel Melnikov from China — on the role of hydrogen in the country’s energy strategy. 🚌 At a bus stop on the outskirts of Shanghai, a bus with green plates and the words “Fuel Cell” on its side pulls up as part of everyday routine, passengers getting on and off. We observed this not only in megacities but also in many county-level cities across China: hydrogen buses, together with the more widespread electric buses, have largely displaced diesel vehicles. 🚜Beyond buses, a wide range of hydrogen-powered equipment is already operating — either in pilot mode or commercially — on Chinese roads: trucks and trailers mining dump trucks bulldozers water trucks street sweepers garbage trucks warehouse forklifts shunting locomotives 👉 This diversity is supported by the rapid development of hydrogen fuel cells and the expansion of industrial-scale production of these next-generation power systems. 🔌Hydrogen is also used in stationary applications: power supply for remote mining and infrastructure sites autonomous ultra-fast EV charging hubs telecom infrastructure off-grid settlements 🏭 While the chemical industry still largely supplies “grey” hydrogen to transport and other sectors, it is simultaneously launching numerous projects to switch from coal and scarce natural gas to green hydrogen — with expectations of cost reductions driven by cheaper renewables and electrolyzers. 🎯Key takeaway China’s energy strategy avoids binary choices and instead follows a “middle path” (中道, Zhong Dao). 👉 It does not choose between electrification and hydrogen. Instead, it treats hydrogen: as a tool for electrifying industry and transport and as a bridge between the world of “molecules” (chemicals, fuels) and the world of “electrons” (powering transport, industry, and utilities) 📌Bottom line: In China, hydrogen is not an alternative to electrification — it is an integral part of a broader, system-level energy transition.