В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🥳
🥳 We are excited to announce the upcoming Cryptopia x SingSing Karaoke night on August 16, 2023 (Wednesday) at 8PM (PH Time). ➡️To join in the fun, all you need to do is follow these steps:
✏️Follow @singsingnetwork on Twitter & Join the SingSing PH Telegram Community - https://t.me/singsingPH
✏️ Post on Twitter a screenshot of your SingSing account and tag @singsingnetwork@domslumabi and @CryptopiaOFCL
✏️ Use the Hashtag #SingSing#Cryptopia#SingSingKaraokeNightwithCryptopia
➡️➡️Five winners will be chosen among new users who post on Twitter.
⭐️But wait, there's more!
✏️
✏️ lucky users who will sing during the Cryptopia x SingSing Karaoke night will also win a wooden mic each. So, warm up those vocal cords and get ready to belt out your favorite tunes.
❤️We hope to see you there! Don't forget to spread the word and invite your friends to join in on the fun.
🔔🔔🔔🔔🔔🔔🔔🔔
Join our community for more:
🌐Global🇵🇭Philippine🇮🇩Indonesian
Cryptopia Resumes User Fund Returns
💰 The beleaguered exchange Cryptopia, which suffered a $16 million hack in 2019 and has been in liquidation, has finally begun refunding its clients. Applications for reimbursement were accepted in 2020, allowing over 10,000 platform users to claim a share of $225 million. Users of the defunct exchange are now receiving invitation letters to file claims for refunds.
Read more: Forklog
#Cryptopia#Funding#Hacking#Exchange#Liquidation
K33 Predicts Bull Run Peak Date
📈 K33 analysts forecast the peak date of the bull run. ⚖️ Craig Wright receives a conditional sentence for contempt of court. 💵 VC investors are retreating from crypto as the market shifts. 📊 Bitcoin's failure at $100K triggered over $1 billion in liquidations. 🐋 El Salvador expands Bitcoin purchases despite IMF deal. 💬 Tornado Cash co-founder demands dismissal of charges. 👾 Ilya Lichtenstein claims sole responsibility for Bitfinex hack. 💰 Cryptopia clients received $225 million in assets from liquidators. ✅ SEC approves first hybrid ETFs based on Bitcoin and Ethereum. 👁 German regulator orders World to delete user data. 👀 Investors file a lawsuit against the HAWK token team. ⚽️ American football player to receive part of salary in Bitcoin. 🚀 Cathie Wood confirms Bitcoin price prediction above $1 million.
#K33#CraigWright#Crypto#Bitcoin#Liquidations#ElSalvador#TornadoCash#Bitfinex#Cryptopia#SEC#ETFs#Germany#HAWK#Football#CathieWood#Investors#Funding#VentureCapital#Market#Investments
Crypto Highlights: Recent Developments
📈 K33 analysts have predicted the peak date of the bull run.
⚖️ Craig Wright received a conditional sentence for contempt of court.
💵 VC investors are leaving crypto, while crypto distances itself from VC investors.
📊 A Bitcoin crash at $100,000 led to over $1 billion in liquidations.
🐋 El Salvador expanded its Bitcoin purchases despite an IMF deal.
💬 Tornado Cash co-founder demands charges be dropped.
👾 Ilya Lichtenstein claims sole responsibility for the Bitfinex hack.
💰 Cryptopia clients received $225 million in assets from liquidators.
✅ SEC approved the first hybrid ETFs based on Bitcoin and Ethereum.
👁 German regulator ordered World to delete user data.
👀 Investors sued the team behind the HAWK token.
⚽️ An American football player will receive part of his salary in Bitcoin.
🚀 Cathy Wood confirmed her Bitcoin price prediction exceeds $1 million.
🤑 Colin Wu shared the success story of a 24-year-old crypto trader.
#K33#CraigWright#VC#Bitcoin#Liquidation#ElSalvador#TornadoCash#Bitfinex#Cryptopia#SEC#ETFs#Germany#HAWK#Football#CathyWood#CryptoTrader#CryptoNews#Investments#MarketTrends#CryptoRegulation#Blockchain