В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🔥NEW RELEASE🔥
😁Forging The Guard: Mastering Foundation's Of The Clamp By Giancarlo Bodoni😁
➡️Unlock the secret to dominating your opponent with Giancarlo Bodoni’s "Forging the Guard: Mastering Foundations of the Clamp". As a 2x ADCC champion, training partner of Gordon Ryan, and student of John Danaher, Giancarlo brings you an exclusive BJJ instructional that dives deep into the world of the Clamp Guard
➡️In this series, Giancarlo breaks down the foundational elements of the Clamp Guard, a unique guard that allows for seamless sweeps, submissions, and positional control.
➡️Whether you're a beginner or an experienced practitioner, this instructional will elevate your guard game by showing you how to lock your opponent down, maintain dominant control, and transition fluidly into devastating attacks.
$197😍$19.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GiancarloBodoni#BJJFanatics#NewWave#NoGi
💁♀️Buy
💁♀️
😁See the Back Take The Back: Guard Passes To Back Takes by Giancarlo Bodoni😁
➡️See the Back, Take the Back: Guard Passes to Back Takes by Giancarlo Bodoni is the definitive blueprint for turning pressure passing into relentless back-taking offense.
➡️As a 2× ADCC champion, CJI standout, and one of the most technically disciplined athletes to emerge from the legendary Danaher system, Giancarlo has built his game around one thing: getting to the back and finishing—against everyone.
$197😍$14.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#GiancarloBodoni#Transitions#NoGi#NewWave
💁♀️Buy
💁♀️
😁Submission Mastery: Omoplata by Giancarlo Bodoni😁
➡️Giancarlo Bodoni — 2x ADCC champion, CJI standout, and elite New Wave athlete under the legendary John Danaher and Gordon Ryan — unveils his groundbreaking system for mastering one of grappling’s most underutilized weapons: the omoplata.
➡️This is not just a submission tutorial. This is a total redefinition of the omoplata for the modern no-gi game — built on elite-level mechanics, control, and finishing options that go far beyond what you thought possible.
$197😍$14.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
👑MasterClass
✈️@bjjfanaticsinstructionals
#GiancarloBodoni#Submission#NoGi#NewWave
💁♀️Buy
💁♀️
😁Forging The Guard: Reverse De La Riva By Giancarlo Bodoni😁
➡️Unlock the full potential of your guard game with Forging The Guard: Reverse De La Riva by Giancarlo Bodoni, a two-time ADCC champion and one of the most successful no-gi athletes on the planet.
➡️This comprehensive instructional series takes you deep into the intricacies of the Reverse De La Riva Guard, a position renowned for its versatility, control, and offensive potential
➡️Giancarlo breaks down each detail with clear, concise direction that will help you build a nearly impenetrable guard while simultaneously making you a constant threat from this powerful position.
$197😍$16.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GiancarloBodoni#NoGi#ReverseDeLaRiva
💁♀️Buy
💁♀️
😁Forging The Guard: De La Riva By Giancarlo Bodoni😁
➡️Unlock the full potential of your guard game with Forging The Guard: De La Riva by Giancarlo Bodoni, a two-time ADCC champion and one of the most successful no-gi athletes on the planet.
➡️This comprehensive instructional series dives deep into the classic De La Riva Guard, a position known for its incredible control, sweeping power, and submission potential.
➡️Giancarlo provides clear and concise direction that will help you elevate your guard to a nearly impassable level while making you a constant offensive threat.
$197😍$16.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GiancarloBodoni#NoGi#DeLaRiva
💁♀️Buy
💁♀️
🔥NEW RELEASE🔥
😁Forging the Guard: Wrestle Ups by Giancarlo Bodoni😁
➡️Giancarlo Bodoni, one of the most dominant grapplers on the planet and a top student of the legendary John Danaher, brings you a game-changing instructional designed to reframe how you think about reversals from the bottom.
➡️In Forging the Guard: Wrestle Ups, Giancarlo reveals how to seamlessly blend traditional BJJ guard positions with low-effort, high-reward wrestle ups—turning common situations into powerful sweeps and takedowns.
̶$̶1̶9̶7̶😍$14.99😍
❗️Channel Info and FAQ (MUST CHECK BEFORE BUY)❗️
📱Payment: 📱📱📱
💰Submeta FOR FREE
🌈UFC Picks
👑MasterClass
✈️@bjjfanaticsinstructionals
#GiancarloBodoni#WrestleUp#NoGi#NewWave
💁♀️Buy
💁♀️