В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
According to @/mkgenie, the president of Michael Jackson's Chinese fanclub, and that had access to the list of recording artists of the MJ tribute project in 2023, Jungkook was one of the renowned singers that would get to sing one of the 10 never-released song written by Michael Jackson along with Bruno Mars, Doja Cat and Sza!
#JUNGKOOK
•@OUR_7_PRINCES•
“Yes, Love him! Incredible! His dancing, singing, songs, incredible machine. I love that dude, like he’s incredible”
— Omar Rudberg, a Venezuelan-Swedish singer and actor, about #Jungkook
#JUNGKOOK
•@OUR_7_PRINCES•
Rolling Stone UK Twitter Update
Read the full interview with #JungKook here
https://www.rollingstone.co.uk/music/features/jung-kook-bts-interview-rolling-stone-photos-57298/
-@All_BTS_Updates
GameSpot, a major American website providing news & reviews about video games, wrote an article about #Jungkook
“BTS's Jungkook Is A Streamer Now, Here Are The Games He's Played So Far”
https://www.gamespot.com/gallery/btss-jungkook-is-a-streamer-now-here-are-the-games-hes-played-so-far/2900-7286/
#INFO
•@OUR_7_PRINCES•
Famous actor Manny Jacinto said #Jungkook was his bias in a recent interview for Cosmopolitan
Q: Recently, a photo of you at a j-hope concert made the internet rounds. Who is your BTS bias?
🗣️ “Jungkook. I was a dancer, and I have this theory. Jungkook apparently trained in Los Angeles when he was younger, and I think we almost crossed paths and trained in the same studio around the same time. I mean, he is, like, eight years younger than me, but I saw videos and pictures of him training at the same studio. And I was like, wait, when was this? And this was around the same time, like, summer of 2012, 2011. I think he’s one of the best dancers on the team. But I also just dig his music.”
#INFO
•@OUR_7_PRINCES•