В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
ICT Week Uzbekistan 2025 was an excellent opportunity to interact and explore new areas of cooperation. See you all the next autumn in Uzbekistan!
Under the leadership of the President of the Republic of Uzbekistan, Shavkat Mirziyoyev, our country continues to strengthen its position as a regional IT hub. A clear reflection of this progress was the unprecedented scale of ICT Week Uzbekistan 2025, which brought together record numbers of participants and visitors.
📊 Key Highlights:
Over 25,000 visitors, 5,000 more than last year;
The number of international delegates reached 2,000 experts — twice as many as last year;
The total exhibition area expanded to 15,000 sq. m (+150% year-on-year);
More than 53.9% of the exhibition space was occupied by foreign companies, demonstrating a 119.3% increase compared to last year and highlighting the global scale of the event;
Official ICT Week Uzbekistan social media platforms achieved a total reach of over 10 million people (+196%).
These achievements are not just numbers — they reflect the growing confidence of the global business and expert community in Uzbekistan, in our digital development strategy, and in our openness to international cooperation.
Today, we are creating an environment where ICT serves as a driving force for economic growth, while enabling our young professionals to prove themselves on the global stage.
ICT Week Uzbekistan 2025 represents the country’s growing international presence and marks an important step toward achieving the goals of “Digital Uzbekistan – 2030.”
#ICTWeekUzbekistan#DigitalUzbekistan2030#TechForGrowth#DigitalTransformation
ICT Week Uzbekistan 2025 was an excellent opportunity to interact and explore new areas of cooperation. See you all the next autumn in Uzbekistan!
Under the leadership of the President of the Republic of Uzbekistan, Shavkat Mirziyoyev, our country continues to strengthen its position as a regional IT hub. A clear reflection of this progress was the unprecedented scale of ICT Week Uzbekistan 2025, which brought together record numbers of participants and visitors.
📊 Key Highlights:
Over 25,000 visitors, 5,000 more than last year;
The number of international delegates reached 2,000 experts — twice as many as last year;
The total exhibition area expanded to 15,000 sq. m (+150% year-on-year);
More than 53.9% of the exhibition space was occupied by foreign companies, demonstrating a 119.3% increase compared to last year and highlighting the global scale of the event;
Official ICT Week Uzbekistan social media platforms achieved a total reach of over 10 million people (+196%).
These achievements are not just numbers — they reflect the growing confidence of the global business and expert community in Uzbekistan, in our digital development strategy, and in our openness to international cooperation.
Today, we are creating an environment where ICT serves as a driving force for economic growth, while enabling our young professionals to prove themselves on the global stage.
ICT Week Uzbekistan 2025 represents the country’s growing international presence and marks an important step toward achieving the goals of “Digital Uzbekistan – 2030.”
#ICTWeekUzbekistan#DigitalUzbekistan2030#TechForGrowth#DigitalTransformation