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

Пребарај: #engines

当前筛选 #engines清除筛选
Car News

@car_news · Post #971 · 04.02.2025 г., 14:50

🚘The year in which the last Aston Martin with V12 will be released has been named All due to global emissions regulations. 📰 Aston Martin will sell its last car with a 12-cylinder engine in just five years, provided that there are no major changes in European environmental policy. With such a forecast the head of the company Adrian Hallmark spoke in an interview with Drive. 🪦 In his opinion, now the European automobile industry is watching the last spurt of V12. 📆 Mass deliveries of cars with V12 Aston Martin will be forced to stop approximately in 2028, and completely remove the engine of this type from production by 2030. The company will be able to prolong for a couple of years the existence of 12-cylinder motor if it will complete with it only small edition special versions and exclusive models. In this case, less stringent requirements for harmful emissions will be applied. In photos there is Aston Martin Vanquish is the flagship of the brand's model range. The most powerful and fastest Aston Martin to date. Under the hood is a V12 5.2 with 835 horsepower and 1000 Nm of torque. The maximum speed is 345 km/h. They plan to produce 1000 cars per year. Price from $432,000. @CarsNews #AstonMartin#engines