В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🏎Aston Martin
Dan Fallows deja de ser director técnico de Aston Martin#AstonMartin
El británico Dan Fallows dejará de ser director técnico del equipo de Fórmula 1 Aston Martin a partir de este mes de noviembre, dentro de la reestructuración prevista en la escudería tras el anuncio de la llegada de nombres importantes como Adrian Newey y Enrico Cardile, según un comunicado
"El equipo Aston Martin Aramco de Fórmula 1 anuncia cambios en la dirección técnica del equipo. Aston Martin y el director técnico Dan Fallows anuncian conjuntamente que, a partir de noviembre, Dan dejará de ser director técnico del equipo, y permanecerá en el grupo", avanzó el equipo en su página web.
El director ejecutivo del grupo Aston Martin Aramco F1 Team, Andy Cowell, agradeció a Fallows "su contribución" a la escudería en los dos últimos años. "Dan llevó al equipo al éxito del AMR23 que consiguió ocho podios la pasada temporada", resaltó.
https://www.europapress.es/deportes/formula1-00312/noticia-dan-fallows-deja-ser-director-tecnico-aston-martin-20241112141801.html
🏆@Info288_deportes
🏎Aston Martin
Adrian Newey ficha por Aston Martin#AstonMartin
El ingeniero británico Adrian Newey confirmó este martes su llegada al equipo de Fórmula 1 Aston Martin, escudería a la que se une como accionista y como socio técnico, después de desvincularse de Red Bull este año, tras 18 temporadas trabajando para los 'energéticos' y 13 Mundiales de pilotos y 12 de constructores en su carrera.
"Sentía que necesitaba un nuevo reto, y a finales de abril decidí que quería hacer algo distinto. Pasé mucho tiempo debatiendo. Necesitaba un nuevo reto para mantenerme fresco, estoy halagado de que muchos equipos se hayan acercado, pero la pasión y el entusiasmo de Lawrence Stroll es muy persuasivo", valoró sobre su fichaje el 'gurú' de la ingeniería en F1 en una rueda de prensa desde la sede del equipo en Silverstone.
Newey llega a Aston Martin como la figura del nuevo proyecto, como accionista de la escudería y socio técnico, para ser el líder de la estructura. "La oportunidad de ser accionista y socio es algo que nunca se me había ofrecido. Así que es ligeramente distinto, un rol distinto y que tengo ganas de desarrollar. Se convirtió en una elección natural", indicó.
https://www.europapress.es/deportes/formula1-00312/noticia-adrian-newey-ficha-aston-martin-20240910121558.html
🏆@Info288_deportes
Первый #astonmartin, который мне понравился❤️
Вот такое можно брать смело.
Мотор от мерседеса 4 литра битурбо, 680 сил, задний привод, коробка ZF. Балансировка машины отличная, карбонокерамика, серпантин, полный бак. Ну что ещё нужно? Кайф🔥
У Aston Martin Valhalla — V8 битурбо и три электромотора, всего 1064 л.с. Задним ходом машина не использует ни ДВС, ни коробку. Движение — только за счёт электромоторов, которые крутят колёса напрямую.
Случайно выяснилось, что их мощность достаточна, чтобы Valhalla разгонялась задом до 140 км/ч. Электромотору всё равно, куда крутиться
Это не уникальная история. У гиперкара Rimac Nevera задний ход тоже «на электричестве», и там однажды решили проверить предел — получилось 276 км/ч.
Это плюс электрички - 👍
Это опасный минус - 👎
#astonmartin
📰Aston Martin's first EV will be powered by Lucid motors
🚘 Aston Martin will use key components from the American company Lucid, including electric motors and batteries.
🚘 In addition, the electric Aston Martin may feature functions similar to those used by Hyundai in its sports EVs, such as imitation of internal combustion engine operation and gear shifting.
#AstonMartin#EV@Car_News
🚘 Aston Martin подал в суд на Geely из-за спора о логотипе
📰 Британский люксовый бренд Aston Martin подал иск против своего совладельца Geely из-за использования крылатого логотипа дочерней компанией LEVC.
ℹ️ Ранее суд по интеллектуальной собственности Великобритании постановил, что подобные эмблемы широко распространены в автомобильной индустрии. Однако Aston Martin пытается оспорить это решение. Представитель Geely заявил, что это стандартная процедура защиты бренда, в то время как Aston Martin отказался комментировать текущий судебный процесс.
Geely Holding Group владеет примерно 13-17% акций Aston Martin.
#AstonMartin#Китай🚘Автоновости
📰 Первый электромобиль Aston Martin будет оснащен двигателями Lucid
🚘 Aston Martin будет использовать ключевые компоненты американской компании Lucid, в том числе электродвигатели и аккумуляторы.
🚘 Кроме того, электрический Aston Martin может быть оснащён функциями, аналогичными тем, которые использует Hyundai в своих спортивных электромобилях, такими как имитация работы двигателя внутреннего сгорания и переключение передач.
#AstonMartin#электромобиль@avtoNovosti
🚘 Aston Martin sues Geely over logo dispute
📰 British luxury brand Aston Martin has filed a lawsuit against its co-owner Geely over the use of a winged logo by its subsidiary LEVC.
ℹ️ Earlier, the UK Intellectual Property Court ruled that such emblems are common in the automotive industry, but Aston Martin is now attempting to overturn that decision. A Geely spokesperson stated that this is a standard procedure to protect brand rights, while Aston Martin declined to comment on the ongoing legal case.
Geely Holding Group owns approximately 13-17% of Aston Martin's shares.
#AstonMartin#China@Car_News
🚘 has unveiled the new Vanquish with a V12
🔻It is equipped with a twin-turbocharged motor with 835 hp and 1000 Nm (the Ferrari 12Cilindri has only 830 hp).
🔻The new flagship will take 3.2 seconds to reach 60 mph (96 km/h) with a top speed of 344 km/h.
🔻Vanquish has a new body, the stiffness of which is increased by 75% compared to the DBS. The brakes are carbon-ceramic. In addition, new adaptive shock absorbers Bilstein DTX are used in the chassis of the sports car.
🔻Deliveries of grand tourers will begin in the IV quarter. Preliminarily, the price of novelty starts from $420 thousand.
@CarsNews
#AstonMartin#sportscar
🚘 представила новый Vanquish с двигателем V12
🔻Он оснащён двигателем с двойным турбонаддувом мощностью 835 л.с. и 1000 Нм (у Ferrari 12Cilindri всего 830 л.с.).
🔻Разгон до 60 миль/ч (96 км/ч) у нового флагмана займет 3,2 секунды, а максимальная скорость составит 344 км/ч.
🔻Vanquish получил новый кузов, жёсткость которого увеличена на 75 % по сравнению с DBS. Тормоза – карбон-керамические. Кроме того, в шасси спорткара используются новые адаптивные амортизаторы Bilstein DTX.
🔻 Поставки гран-туреров начнутся в IV квартале. Предварительно, цена новинки стартует от 420 тысяч долларов.
@avtoNovosti
#AstonMartin#спорткар
🆕Aston Martin Vanquish Volante2026
One of the most powerful open-top cars in the world.
🚘 The new Aston Martin Vanquish Volante is Aston Martin's attempt to improve its global sales. Same incredible twin-turbo V-12, now with unlimited headroom.
🔎 The twin-turbo V12 5.2-liter produces 824 horsepower. Acceleration to 100 km/h in 3.4 seconds. The price of the car will be around $450,000. Production begins in the third quarter of 2025; fewer than 1,000 will be built each year.
For 60 years, Aston Martin Volantes have defined the art of elegant, sporting, open-top motoring. With its stunning looks and outstanding V-12 engine producing more power than any other front-engine production car on sale, Vanquish Volante has taken this philosophy to an entirely new level.
– said Aston Marton CEO Adrian Hallmark.
@CarsNews
#AstonMartin#roadster
🚘 Vantage roadster got a fast-folding roof
🆕 Aston Martin Vantage's soft top folds down in just 6.8 seconds. It is not only fast, but also light: the roadster is heavier than the coupe only by 60 kilograms.
😯 Thanks to the multi-layer material of the top, the noise level in the cabin when the roof is closed is comparable to that of a coupe. The top can be folded or closed at speeds up to 50 km/h.
🐎 The roadster will be equipped with the same engine as the coupe: it is a V8 with a volume of 4.0 liters, which develops 665 hp and 800 Nm.
@CarsNews
#AstonMartin#roadster