В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
央视 报道电动车企业“锁电”丑闻。
简单说就是电池保质期前通过锁电,限制使用,800的标定里程可能只能跑3,400,保质期结束后再看情况解开。
以防电池因正常性能使用而坏掉。
#新能源
CCTV reported on the "battery-locking" scandal involving electric vehicle companies.
Simply put, this involves locking the battery's charge before its warranty expires, restricting its use. A battery with a rated range of 800 km might only achieve 300-400 km. The lock is then lifted after the warranty expires, depending on the situation.
This is to prevent the battery from failing due to normal use.
#NewEnergy
BYD CHAZOR avtomobilining dinamikasi va tezkorligini his eting.
Uchrashuvga bir kundan ozroq vaqt qoldi…
____
Испытайте на себе динамику и стремительность BYD CHAZOR.
До встречи осталось меньше суток…
#byduz#BuildYourDreams#bydauto#byduzbekistan#auto#bydauto#bydtashkent#newenergy
FJ Dynamics Secures $1.5M Funding
FJ Dynamics closes a funding round of $1.50M, scheduled for November 30, 2024. The company specializes in robotics, digitization, automation, and new energy, applying its technology across precision agriculture, digital construction, geospatial, and electrical sectors. Learn more at FJ Dynamics.
#FJDynamics#Funding#Robotics#Automation#NewEnergy#PrecisionAgriculture#DigitalConstruction#Geospatial#Electrical
Green Future texnologiyalari BYD kompaniyasining texnologik innovatsiyalar orqali barqaror kelajakka sodiqligini mustahkamlaydi.
⠀
BYD kompaniyasi NEV dvigatellarini ishlab chiqarishni boshlagan birinchi kompaniya hisoblanadi. Kompaniya faqatgina ekologik toza BEV (akkumulyatorli elektromobillar) va PHEV (plug-in gibrid elektromobillari) avtomobillarini ishlab chiqarishga e'tibor qaratish uchun yonish dvigateli bilan jihozlangan transport vositalarini ishlab chiqarishni to'xtatgan.
⠀
Brend haqida batafsil ma'lumot olish uchun:
bydauto.uz
⠀
_
Технологии Green Future подкрепляют непоколебимую приверженность BYD к устойчивому будущему за счет технологических инноваций.
⠀
BYD — первый в мире производитель автомобилей на новой энергии NEV, который прекратил производство автомобилей с двигателем полного сгорания, чтобы сосредоточиться исключительно на более экологически чистых BEV (аккумуляторных электромобилях) и PHEV (подключаемых гибридных электромобилях).
⠀
Узнать о бренде больше:
bydauto.uz
⠀
#byduz#BuildYourDreams#bydauto#byduzbekistan#auto#bydauto#bydtashkent#green#EV#NEV#newenergy#electrovehicle
Shunchaki his eting...
Bugun. Ajoyib yangilik. Hayajonli fursat.
SONG PLUS DM-i.
Zamonaviy krossover qanday bo'lishi kerakligi haqidagi tasavvuringizni o'zgartiruvchi uchrashuvga oz fursat qoldi.
____
Просто почувствуйте…
Сегодня. Что-то новое. Что-то захватывающее.
SONG PLUS DM-i.
До встречи, которая изменит ваши представления о том, каким должен быть современный кроссовер, осталось совсем недолго.
#byduz#BuildYourDreams#bydauto#byduzbekistan#auto#bydauto#bydtashkent#green#EV#NEV#newenergy#electricvehicle
BYD HAN, BYD CHAZOR yoki SONG PLUS DM-i? Ularning qaysi biri sizga ko'proq yoqadi? Fikringizni izoh sifatida yozib qoldiring.
_
BYD HAN, BYD CHAZOR или SONG PLUS DM-i? Кто из них — ваш личный фаворит? Пишите в комментариях.
#byduz#BuildYourDreams#bydauto#byduzbekistan#bydauto#bydtashkent#NEV#newenergy#car#automotive#caroftheday#BYDCHAZOR#BYDHAN#SONGPLUSDM-i
Katta shahar ritmida - muhim narsalarni o'tkazib yubormang. Go'zallikka e'tibor qarating.
Misol uchun, quyosh botishiga.
BYD CHAZOR bilan quyosh botishini go'zallik bilan qarshi oling
__
В ритме большого города — не упускайте что-то важное. И обязательно замечайте прекрасное.
Например, закат.
Встречайте закат стильно с BYD CHAZOR
#byduz#BuildYourDreams#bydauto#byduzbekistan#bydauto#bydtashkent#NEV#newenergy#car#automotive#carlifestyle#caroftheday#citylife#urbanmobility
Kuchli ikkitalik yorug'lik diod faralar tunning yakunini ifodalovchi tong yulduziga o'xshaydi.
⠀
Yulduzli matritsa — taniqli dizayn va futuristik uslubning bir qismidir.
⠀
Bir-biriga tutash orqa chiroqlar yelkanlarni eslatadi va yaqinlashib kelayotgan yoqimli sayohatning tuyg'usini beradi.
BYD CHAZOR bilan hayratlangan nigohlar to'lqinidan bahramand bo'ling.
Avtomobil haqida batafsil: bydauto.uz
⠀
#byduz#BuildYourDreams#bydauto # #bydauto#bydtashkent#NEV#newenergy#car#automotive#carlifestyle#caroftheday#citylife#urbanmobility#BYDCHAZOR
_
Мощные двойные светодиодные фары подобны утренней звезде, знаменующей окончание ночи.
⠀
Звездная матрица — часть узнаваемого дизайна и футуристичности.
⠀
Сплошные задние фонари напоминают развевающиеся паруса, и дарят полное ощущение приближающегося приятного путешествия.
Ловите волны восхищенных взглядов с BYD CHAZOR.
Узнать об автомобиле больше: bydauto.uz
⠀
#byduz#BuildYourDreams#bydauto # #bydauto#bydtashkent#NEV#newenergy#car#automotive#carlifestyle#caroftheday#citylife#urbanmobility#BYDCHAZOR
🚀 STOCKS | Galaxy Securities Highlights Opportunities Amid Rising Oil Prices
On April 12, Galaxy Securities released a report noting that March's Producer Price Index (PPI) turned positive year-on-year, driven by high oil prices and ongoing policy efforts. According to Jin10, the report emphasizes the potential for profit recovery in China's A-share market, particularly in upstream sectors.
The report identifies several investment opportunities. Firstly, it suggests focusing on energy and alternative demand sectors, including coal, coal chemicals, new energy, shipping ports, and oil and gas. Additionally, there is potential for recovery in the non-ferrous metals sector, including precious and minor metals.
Secondly, the report highlights defensive assets such as finance (banks), utilities, and transportation. Thirdly, it points to technology innovation and self-sufficiency sectors, including power equipment, energy storage, semiconductors, computing power, and communication equipment. In the consumer sector, it suggests focusing on agriculture, forestry, animal husbandry, fisheries, food and beverages, and household appliances.
The report also notes that if there are signs of easing in ongoing conflicts, there could be significant recovery opportunities in previously oversold sectors.
#GalaxySecurities#OilPrices#ProducerPriceIndex#ProfitRecovery#AShareMarket#UpstreamSectors#EnergySector#AlternativeDemand#Coal#NewEnergy#ShippingPorts#OilAndGas#NonFerrousMetals#PreciousMetals#DefensiveAssets#Finance#Utilities#Transportation#TechnologyInnovation#SelfSufficiency#PowerEquipment#EnergyStorage#Semiconductors#ComputingPower#CommunicationEquipment#ConsumerSector#Agriculture#FoodAndBeverages#HouseholdAppliances#RecoveryOpportunities