В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🚨 Just had an intriguing discovery at the Blokhin Institute in Moscow, Russia.
While waiting for my doctor's appointment, I decided to explore the institute's museum. Among the exhibits, I stumbled upon a personal letter and invitation from Edward Kennedy to one of the institute's doctors. This was during the Cold War era, which makes this find even more fascinating.
It seems that even amidst political tensions, there was recognition of the significant contributions Russia has made to arts and sciences. This glimpse into history reminds us of the importance of collaboration in fields like medicine, where advancements benefit everyone, regardless of borders.
#BlokhinInstitute#ColdWarHistory#MedicalResearch#InternationalCollaboration#RussianAchievements
Tessera Therapeutics Secures $50M
Tessera Therapeutics has raised $50 million in funding on December 18, 2024. The early-stage life sciences company is at the forefront of Gene Writing™, a cutting-edge biotechnology aimed at transforming medicine and scientific research. More details available on their official website: Tessera Therapeutics
#TesseraTherapeutics#Funding#LifeSciences#Biotechnology#GeneWriting#Healthcare#MedicalResearch
$140M Funding for Ottimo Pharma
Ottimo Pharma announces a funding round of $140 million set for December 19, 2024. The company focuses on developing bi-functional medicines aimed at improving the lives of individuals living with cancer.
Learn more
#Funding#OttimoPharma#Cancer#BiFunctionalMedicines#Healthcare#Pharmaceuticals#LifeSciences#Investments#MedicalResearch#Oncology#HealthTech#Biotechnology
PeproMene Bio Secures $11M Round
PeproMene Bio, Inc., a clinical-stage biotech firm based in Irvine, CA, has successfully raised $11 million in funding. The investment round closed on December 18, 2024, focusing on innovative therapies targeting cancers and immune disorders.
More info: PeproMene Bio
#Biotech#Funding#Cancer#ImmuneDisorders#California#ClinicalStage#Therapies#Investment#Healthcare#Innovation#PeproMeneBio#Pharmaceuticals#MedicalResearch#DrugDevelopment
$60M Funding for Psioxus
Psioxus Therapeutics has successfully secured $60M in funding as part of its latest round, scheduled for December 17, 2024. This funding aims to advance its innovative tumor gene therapy platform focused on improving cancer treatment outcomes.
#Funding#Cancer#Biotech#Oncology#GeneTherapy#Therapeutics#ClinicalStage#Investment#Healthcare#Psioxus#AkamisBio#Tumor#LifeScience#MedicalResearch#Therapy#Innovative#Impact#Technology#Platform