В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
#admin@cosmosy
✨ В Корее уже 11 апреля, а значит пришло время поздравить наших очаровательных cosmosy с первой годовщиной со дня их официального дебюта!
👍 За этот год девочки подарили нам 2 прекрасных альбома, множество интересных клипов, а также ярких выступлений и образов! Они рассказывают нам свою историю, в которой они одновременно предстают в качестве обычных школьниц, в качестве айдолов и даже мифических существ!
🎉 Желаем cosmosy оставаться такими же милыми и целеустремлёнными! Пусть у них будет как можно больше верных поклонников, а в работе пусть их окружают внимательные и заботливые люди!
🤗 Счастья, здоровья и успехов вам, наши дорогие Химеша, Дихана, Камион и Эймей!
يه جوری لفت میدین ک انگار سيبيلاي معين رو من زدم😐
لباي شهرام صولتي رو من پروتز کردم😐
کليپس رو من ساختم😐
من گفتم پسرا ابرو بردارن😐
من گفتم گلزار اهنگ بخونه😐
سرعت نت رو من اوردم پايين😐
شماره احسان علی خانی رو من دارم😐
که دخترا خواستگار ندارن تقصیر منه😐
کولر خونه رو من خاموش میکنم😐!
خو لفت ندین دیع😐😐😒
#Admin
@dardodelhayeman751
✨Good evening our dear members. How are you doing? Hope you're all fine and safe!
I hope you find the posts useful and you're really doing a great progress in developing listening and reading skills.👍🏻
My advice for you is to listen and read regularly and reinforce them through answering the quizzes after each recording.🎧
Best wishes!🌹
✍🏻#admin
✨Good afternoon, dear friends.🌸
Be ready for tonight's quiz onThe First, Second&Third Conditionalslessons. So kindly, give them a quick review!🙂
✍🏻#admin
✨ Good evening dear friends 🌸
How are you all doing? Hope you're doing great and making a good use of your time at home!🙂
Kindly, review all the lessons about the future above👆🏻and be well prepared for the quiz tonight, God willing.
I expect to see more interaction than before. The more you participate in answering the questions, the more you understand the grammar rules and guidelines.👌🏻
Stay home, wash your hands regularly and be safe.😊
✍🏻#admin
Good evening dear friends! 🌺
Are you ready for tonight's quiz? I'm sure you are!👍 It's gonna be on the last two lessons:Going to and Will.
Stay home and be safe.🙂
✍🏻#admin
Good evening dear friends.🌸
Kindly, review the last two lessons on the past perfect simple and past perfect continuous for tonight's quiz, God willing.😊
Please, stay home and be safe! 🤲
✍#admin
@EnglishGrammarSecrets
Dear members!✨
This is your channel, so if you have any comment, suggestion or question, feel completely free to send it here👇.
@EnglishGrammarSecrets_bot
✍#Admin
https://medium.com/django-musings/customizing-the-django-admin-site-b82c7d325510
Customizing the #Django#Admin site
Let’s start by saying that Django’s admin site is spectacular. It can literally save you months of work, but having said that, one thing that one needs to understand is that Django’s admin site is only ok as an internal tool. It is not, and never has been intended to be, an end user tool.
✨Good morning, dear friends. Have a wonderful day ahead.☀️
Be ready for tonight's #quiz onMixed Conditionalslesson. So kindly, give them a good review!💪🏻🙂
✍🏻#admin