В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🚀 What an incredible start to Token2049!
The energy at the #CoinEx booth has been electric, with non-stop engagement from our global community.
A massive thank you to everyone who joined the queues for our exclusive merch, participated in vibrant discussions, and shared their insights on the future of crypto.
The excitement is just getting started. If you missed the Day 1 action, there's still time to connect.
Find us at our booth tomorrow!
⚡️ Transform your crypto experience with CoinEx, just like Wukong's 72 transformations. Get started today!
➡️ Register CoinEx: https://www.coinex.com/register?refer_code=webgh
#Wukong#CoinEx
⚡️ Defy the odds like Wukong in battle. On CoinEx, every trade is a step toward your next big victory!
➡️ Register CoinEx: https://www.coinex.com/register?refer_code=webgh
#Wukong#CoinEx
✔️ Master the art of trading, just like Wukong mastered his powers. Start with CoinEx today and become a crypto legend
➡️ Register CoinEx: https://www.coinex.com/register?refer_code=webgh
#Wukong#CoinEx
✔️ Forge your own crypto legend with CoinEx, just like Wukong in his journey. Start trading today!
➡️ Register CoinEx: https://www.coinex.com/register?refer_code=webgh
#Wukong#CoinEx
💥 Every trade is a step closer to victory! CoinEx is your battlefield—are you ready to conquer?
➡️ Register CoinEx: https://www.coinex.com/register?refer_code=webgh
#Wukong#CoinEx
👍Like Wukong battling epic bosses, conquer your crypto journey with CoinEx. Sign up now and get ready to take on the world of digital assets!
➡️ Register CoinEx: https://www.coinex.com/register?refer_code=webgh
#Wukong#CoinEx
🔥 CoinEx continues to deliver on its promise! 🔥
💵$CET's 1st Monthly Repurchase & Burn 🔥 of 2026 is complete:
🔥🔥🔥🔥🔥🔥🔥🔥
🪙 Repurchased & Burned $CET: 13.4 M $CET
💰 Remaining $CET: 2.53 B $CET (25.3%~)
🔥🔥🔥🔥🔥🔥🔥🔥
In line with our commitment, we continue daily #CET repurchases & monthly token burns to maintain the #CoinEx deflationary mechanism.🌐
🖐 Find the details HERE
🎯 Why Hold $CET?
$CET isn’t just a token — it’s your key to the CoinEx ecosystem!
✅ Trading fee discounts
✅ VIP privileges & exclusive promos
✅ Daily interest rate discount in Margin borrow
✅ Daily buybacks & monthly burns
✅ Referral ratio upgraded, with up to 40% rewards
✅ Exclusive promotional privileges:
✅ CET Staking
✅ CoinEx Mining
As CoinEx grows, so does CET’s utility and value.
Find CoinEx:
🌐Web
❌𝕏
✉️Telegram
✈Announcement
🛜Discord
🔥 CoinEx continues to deliver on its promise! 🔥
💵$CET's 11th Monthly Repurchase & Burn 🔥 of 2025 is complete:
🔥🔥🔥🔥🔥🔥🔥🔥
🪙 Repurchased & Burned $CET: 16.9 M $CET
💰 Remaining $CET: 2.56 B $CET (25.6%~)
🔥🔥🔥🔥🔥🔥🔥🔥
In line with our commitment, we continue daily #CET repurchases & monthly token burns to maintain the #CoinEx deflationary mechanism.🌐
🖐 Find the details HERE
🎯 Why Hold $CET?
$CET isn’t just a token — it’s your key to the CoinEx ecosystem!
✅ Trading fee discounts
✅ VIP privileges & exclusive promos
✅ Daily interest rate discount in Margin borrow
✅ Daily buybacks & monthly burns
✅ Referral ratio upgraded, with up to 40% rewards
✅ Exclusive promotional privileges:
✅ CET Staking
✅ CoinEx Mining
As CoinEx grows, so does CET’s utility and value.
Find CoinEx:
🌐Web
❌𝕏
✉️Telegram
✈Announcement
🛜Discord
🔥 CoinEx continues to deliver on its promise! 🔥
💵$CET's 10th Monthly Repurchase & Burn 🔥 of 2025 is complete:
🔥🔥🔥🔥🔥🔥🔥🔥
🪙 Repurchased & Burned $CET: 16.9 M $CET
💰 Remaining $CET: 2.57 B $CET (25.7%~)
🔥🔥🔥🔥🔥🔥🔥🔥
In line with our commitment, we continue daily #CET repurchases & monthly token burns to maintain the #CoinEx deflationary mechanism.🌐
🖐 Find the details HERE
🎯 Why Hold $CET?
$CET isn’t just a token — it’s your key to the CoinEx ecosystem!
✅ Trading fee discounts
✅ VIP privileges & exclusive promos
✅ Daily interest rate discount in Margin borrow
✅ Daily buybacks & monthly burns
✅ Referral ratio upgraded, with up to 40% rewards
✅ Exclusive promotional privileges:
✅ CET Staking
✅ CoinEx Mining
As CoinEx grows, so does CET’s utility and value.
Find CoinEx:
🌐Web
❌𝕏
✉️Telegram
✈Announcement
🛜Discord
🔥 CoinEx continues to deliver on its promise! 🔥
💵$CET's 8th Monthly Repurchase & Burn 🔥 of 2025 is complete:
🔥🔥🔥🔥🔥🔥🔥🔥
🪙 Repurchased & Burned $CET: 22.2 M $CET
💰 Remaining $CET: 2.61 B $CET (26.1%~)
🔥🔥🔥🔥🔥🔥🔥🔥
In line with our commitment, we continue daily #CET repurchases & monthly token burns to maintain the #CoinEx deflationary mechanism.🌐
🖐 Find the details HERE
🎯 Why Hold $CET?
$CET isn’t just a token — it’s your key to the CoinEx ecosystem!
✅ Trading fee discounts
✅ VIP privileges & exclusive promos
✅ Daily interest rate discount in Margin borrow
✅ Daily buybacks & monthly burns
✅ Referral ratio upgraded, with up to 40% rewards
✅ Exclusive promotional privileges:
✅ CET Staking
✅ CoinEx Mining
As CoinEx grows, so does CET’s utility and value.
Find CoinEx:
🌐Web
❌𝕏
✉️Telegram
✈Announcement
🛜Discord
🔥 CoinEx continues to deliver on its promise! 🔥
💵$CET's 7th Monthly Repurchase & Burn 🔥 of 2025 is complete:
🔥🔥🔥🔥🔥🔥🔥🔥
🪙 Repurchased & Burned $CET: 17.45 M $CET
💰 Remaining $CET: 2.632 B $CET (26.3%~)
🔥🔥🔥🔥🔥🔥🔥🔥
In line with our commitment, we continue daily #CET repurchases & monthly token burns to maintain the #CoinEx deflationary mechanism.🌐
🖐 Find the details HERE
🎯 Why Hold $CET?
$CET isn’t just a token — it’s your key to the CoinEx ecosystem!
✅ Trading fee discounts
✅ VIP privileges & exclusive promos
✅ Daily interest rate discount in Margin borrow
✅ Daily buybacks & monthly burns
✅ Referral ratio upgraded, with up to 40% rewards
✅ Exclusive promotional privileges:
✅ CET Staking
✅ CoinEx Mining
As CoinEx grows, so does CET’s utility and value.
Find CoinEx:
🌐Web
❌𝕏
✉️Telegram
✈Announcement
🛜Discord