В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🇺🇿🇰🇷Biznes va tadbirkorlik oliy maktabi va Janubiy Koreyaning “Hancom academy” vakillari uchrashuvi bo‘lib o‘tdi
🇺🇿 Biznes va tadbirkorlik oliy maktabi va Janubiy Koreyaning “Hancom academy” vakillari o‘rtasida rasmiy uchrashuv bo‘lib o‘tdi. Tomonlar bir-birlarini samimiy kutib olib, o‘z faoliyat yo‘nalishlari haqida qisqacha ma’lumot almashdilar.
📝Batafsil
———
🇺🇿🇰🇷Состоялась встреча представителей Высшей школы бизнеса и предпринимательства и южнокорейской "Hancom academy"
🇺🇿 Состоялась официальная встреча представителей Высшей школы бизнеса и предпринимательства и южнокорейской «Hancom academy». Стороны тепло приветствовали друг друга и кратко обменялись информацией о направлениях деятельности.
📝Подробно
———
🇺🇿🇰🇷A meeting was held between representatives of the Graduate School of Business and Entrepreneurship and the South Korean "Hancom academy"
🇺🇿 An official meeting was held between representatives of the Graduate School of Business and Entrepreneurship and the South Korean "Hancom academy". The parties warmly welcomed each other and briefly exchanged information about their areas of activity.
📝More
#GSBE#GraduateSchool#SouthKorea#Hancom#Meeting
🔝Web-site |🔝Facebook | 🔝Instagram | 🔝Youtube
Koreyaning “Hancom Group” kompaniyasi Vitse-prezidenti bilan muzakara o'tkazildi
✅ Uchrashuvda universitetga investitsiyalar jalb qilish, hamda grant mablag'lari asosida “Smart school” loyihasini joriy etish istiqbollari muhokama qilindi.
☑️ Loyihaga ko'ra universitetni qo'shimcha texnologiyalar bilan ta'minlash, laboratoriya xonalarini zamonaviy asbob-uskunalari bilan boyitish va talabalarning xorijiy amaliyotlarini tashkil etish uchun qo'shimcha investitsiya va grantlar jalb qilish rejalashtirilgan.
📌Ma'lumot uchun, “Hancom Group” kompaniyasi KoreyadaTop 5 ta eng yaxshi IT kompaniyalardan biri hisoblanadi.
🔁English
➖➖➖➖➖➖➖➖➖➖➖➖➖
#hancom#investitsiya#grant
⬇️ Biz ijtimoiy tarmoqlarda:
Veb-sayt | Telegram | Instagram | Facebook
Investment in education is the best investment for companies with long term development goals in Uzbekistan, since our country has many young people eager to learn new skills and work in modern industries.
There will be more specialists with better #Korean and #IT_skills thanks to the investment into education by #Hancom, a leading Korean IT company, so that graduates will have better chances to pursue their careers in Korean ITES companies.
We invite other companies to follow this example and invest in the education of our young people!
From the Government side we subsidize every successful graduate, who was employed by ITES company, up to $2000 or up to $3000 if s/he is disabled depending on their salary.
Also we fully reimburse IT certification and training costs for our people, so that it opens up additional opportunities for training companies to expand their business with us. Rustam Karimjonov 's team will follow up with interested training companies.
#ESG#Education_for_future_success#Korean_language