В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🆕 TokenPocket Chrome Extension's Latest (1.2.3) Version has enabled Nostr Protocol by default! #Nostr
👉https://extension.tokenpocket.pro/#/
✅With no complex setting steps, all the TokenPocket users can get their own Nostr address easily!
🎯Your Points Matter! TokenPocket will keep working on listening to communities' voices and optimizing users' experience. #TokenPocket#nostr
How to enable Nostr Protocol on TokenPocket Mobile wallet?
Guide 👉https://help.tokenpocket.pro/en/wallet-operation/protocol/nostr
【Details】https://twitter.com/TokenPocket_TP/status/1745755553039802879
【Powered By】Crypto Box
🔵Enjoy Nostr Protocol on TokenPocket_TP.
TokenPocket now supports #Nostr Protocol on Mobile Wallet and Chrome Extension Wallet. You can easily enable your #Nostr address on #TokenPocket!
Guide👇
https://tokenpocket-gm.medium.com/enjoy-nostr-protocol-on-tokenpocket-b53044dd10f0
【Details】https://twitter.com/TokenPocket_TP/status/1733450921391358056
【Powered By】Crypto Box
#Nostr Protocol is now available on TokenPocket_TP!
🔥TokenPocket now provides the Nostr support for #Bitcoin, dogecoin network, and all the EVM-compatible networks!
How to enable Nostr in your TokenPocket wallet?
🔵Android: Tap “Me” - “Experience” - Enable Nostr. You can get your Nostr address by tapping “Details” on the Assets Page.
🔵iOS: Tap “Me” - “Setting” - Turn on “Nostr”. You can get your Nostr assets by tapping “Details” on the Assets page.
#taproot#bitcoin#Nostr
【Details】https://twitter.com/TokenPocket_TP/status/1724712691523100844
【Powered By】Crypto Box
🌟Nostr Protocol is Live On TokenPocket!
>Both on Mobile Wallet and Chrome Extension.
And Nostr Protocol is available for all the EVM-compatible networks, #Bitcoin, and also #Dogecoin on TokenPocket!
🔥Nostr is a simple, open protocol for a global, decentralized, and censorship-resistant social networking system.
📝Here is the tutorial to guide you on how to enable/support #Nostr on your TokenPocket wallet.
👉https://help.tokenpocket.pro/en/wallet-operation/protocol/nostr
🔥#Nostr Protocol is Live On TokenPocket_TP!
>Both on Mobile Wallet and Chrome Extension.
🔥Nostr is a simple, open protocol for a global, decentralized, and censorship-resistant social networking system.
Here is the tutorial to guide you on how to enable/support #Nostr on your TokenPocket wallet.
👉https://help.tokenpocket.pro/en/wallet-operation/protocol/nostr
📣All in TokenPocket! #Nostr#EnableNostr#Bitcoin
👉https://www.tokenpocket.pro/
👉https://extension.tokenpocket.pro/ NoScription
【Details】https://twitter.com/TokenPocket_TP/status/1741998782320136275
【Powered By】Crypto Box
#Bitcoin Eco is on fire!!🔥🔥🔥
TokenPocket Mobile Wallet now provides a super easy-to-use experience for most #Nostr-based DApps. Recently, we also noticed that there is a new product live on #Nostr Protocol. NostrAssets
📣You can discover Nostr Assets on NostrAssets with #TokenPocket and access the new era of #Bitcoin Eco.
> Enter "NostrAssets" on your Discover page then you can find it! ✅✅
Just the beginning!
💥 Let's work together and bring more highlights to #Bitcoin! #Taproot
❓How to enable #Nostr on your TokenPocket?
Tutorial👉https://help.tokenpocket.pro/en/wallet-operation/protocol/nostr
【Details】https://twitter.com/TokenPocket_TP/status/1719933875059855422
【Powered By】Crypto Box
#AMA TokenPocket × NostrSwap
⏰Jun 29th, 1 PM UTC
🪑 Venue: https://t.me/tokenPocket_en
✅Comment your Qs about NostrSwap, #BRC20 and #Nostron Twitter before AMA.
✅Join Telegram and enjoy the live AMA
🎁100 USDT to 5 best Twitter Qs & 5 best Live Qs
Zapstore
Permissionless and social app store built on the #nostr protocol
For #Android#Linux and #Mac
https://zapstore.dev
Download
https://zapstore.dev/download/
Sources
https://github.com/zapstore
Secure by default
Everything you install comes from trusted sources and is cryptographically verified. Not satisfied with the default? Choose your own curators, or mix and match! Censorship has no place in our world.
Relevant to you
Supercharged by the nostr open protocol, recommendations come right from your social connections — or use it in totally private way. With our growing catalog, you will never run out of great apps.
Support your devs
Connect with your favorite developers: send them direct feedback, request features and support them through micropayments, all without any middlemen.
#apk#store