В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🔊 Greetings, SLEX Community!
🚀SLEX platform believes in the power of community-driven ideas. Your thoughts and suggestions are our guiding stars, leading us on the path of innovation and improvement.
Do you have an idea, a suggestion, or a spark of creativity that could help us in SLEX reach new heights?💡
We're inviting YOU, our valued community members, to share your insights! What's that one thing you'd love to see on SLEX? A new trading pair or tool? Some interface features? Let's get those creative brainstorming! 🌟
Comment below, and let's turn your ideas into product feature!
#SLEX#CryptoCommunity#CryptoInnovation#Blockchain
Email | Telegram | Reddit | Facebook | Instagram | Medium | Linkedin | Twitter
🎧⤴
🤑 Tether's Game-Changer: Dirham-Pegged Stablecoin Set to Launch on TON Blockchain!
Tether is set to unveil a new dirham-pegged stablecoin on the TON blockchain, following its successful integration of USDT, which recently reached 1 billion tokens. This stablecoin, backed by liquid UAE reserves, aims to enhance cross-border payments and facilitate secure transactions in the UAE. Tether's partnership with Phoenix Group and Green Acorn Investments underscores the UAE's growing influence as a global cryptocurrency hub. This launch coincides with the UAE's new licensing framework for stablecoins, positioning Tether as a key player in the region's digital economy.
Chorus:
Tether's bringing fire with the dirham in the game,
Stablecoin's the name, ain't no two the same.
On the TON blockchain, watch the future ignite,
Secure your transactions, everything feels right.
Verse 1:
In the desert where the sun shines bright,
Tether’s dirham stablecoin takes flight.
Backed by reserves, it’s liquid and clean,
Digital dirhams, if you know what I mean.
From Dubai to the world, we’re breaking the mold,
Cross-border cash flows, stories to be told.
With every transaction, the trust is built,
A new era of finance, no room for guilt.
Chorus:
Tether's bringing fire with the dirham in the game,
Stablecoin's the name, ain't no two the same.
On the TON blockchain, watch the future ignite,
Secure your transactions, everything feels right.
Verse 2:
Blockchain's the highway, speeding up the grind,
With 160k transactions, we’re redefined.
Companies on Fireblocks, joining the race,
Tether’s got the vision, setting the pace.
UAE's the scene, where crypto thrives,
With innovation and rules, it’s where ambition arrives.
From USDT’s success to the dirham's embrace,
Tether’s changing the game, it’s a whole new space.
Chorus:
Tether's bringing fire with the dirham in the game,
Stablecoin's the name, ain't no two the same.
On the TON blockchain, watch the future ignite,
Secure your transactions, everything feels right.
Verse 3:
Regulations in place, clarity to thrive,
UAE's got the vision, watch the market come alive.
With partners by our side, we’re aiming for the stars,
Bringing trust and stability, no matter where you are.
From the city of gold, the world we’ll engage,
In this digital era, we’re turning the page.
Tether's dirham stablecoin, a future so bright,
Crypto's revolution, we're ready to ignite.
Chorus:
Tether's bringing fire with the dirham in the game,
Stablecoin's the name, ain't no two the same.
On the TON blockchain, watch the future ignite,
Secure your transactions, everything feels right.
Bridge:
So here’s to the future, with crypto in our hands,
Building a new world, making bold plans.
Tether's on a mission, we’re setting the tone,
In the heart of the UAE, we’re claiming our throne.
#CryptoInnovation#Stablecoin#UAEBlockchain
#TONCryptoNewsRapStyle
🎧@toncoin_rap
🚀 Quantum Safe Bitcoin Proposed to Resist Quantum Attacks
Avihu Levy has introduced a concept called Quantum Safe Bitcoin, which is a hash-based transaction design intended to withstand quantum computing attacks. According to NS3.AI, this proposal seeks to enhance Bitcoin's security without altering its fundamental rules. The estimated cost for implementing this design using cloud GPU computing ranges from $75 to $150. However, the complete transaction assembly and broadcast have yet to be demonstrated on the blockchain.
#QuantumSafeBitcoin#Bitcoin#QuantumComputing#Blockchain#Cryptocurrency#CyberSecurity#DigitalCurrency#CryptoInnovation#BTC
🌟This time has finally come! SLEX Exchange is now officially IN GAME!🎉
🌍An entire year of dedication and ceaseless effort has culminated in the birth of the magnificent SLEX platform. Here, you will embark on a journey where depositing, safeguarding, and trading your beloved cryptocurrencies becomes as effortless as sipping nectar from a divine chalice of prosperity🌈
📍Sign up for the SLEX platform, deposit your account with a bank card, and start earning! Unlock the realm of spot trading and witness your fortunes soar like a majestic phoenix against the ethereal skies!🌐
#SLEXLaunch#CryptoInnovation#EmpoweringTraders#CryptoAdventure#SecureStorage#SpotMarketMagic
Email | Telegram | Reddit | Facebook | Instagram | Medium | Linkedin | Twitter
🚀Let the Sale Begin: The first SLEX Launchpad for 4000 Participants Starts on February 15th! 🎉
⚡️We are thrilled to announce that the Whitelist on SLEX has been successfully closed with more than 4000 participants. And now we are at the finish line because it's only two days until the launch of the much-anticipated SLEX Launchpad!⚡️
📈Mark your calendars and prepare to join SLEX Launchpad to get access to exceptional ways of earning:
🔥Access to Tier-1 Projects: SLEX token holders will gain exclusive access to Tier-1 projects, offering a gateway to the most promising and innovative crypto projects.
💰Staking Rewards and Trading Benefits: Token holders can get rewards from staking and additional trading bonuses at SLEX Exchange.
📅 If you are a Whitelist member check out email for more details and instructions about participation in the first SLEX Launchpad!
#SLEX#LaunchpadAnnouncement#CryptoInnovation#SLEXTokens#TradingBenefits#SLEXLaunchpad#SLEXWhitelist
Website| Telegram | Reddit | Facebook | Instagram | Medium | Linkedin | Twitter
🚀 Paradigm CEO Highlights Gen Z's Impact on Crypto Innovation
Paradigm, a crypto investment firm managing approximately $12 billion, is led by co-founder and CEO Matt Huang. According to Odaily, Huang acknowledges that while Gen Z employees can sometimes create chaos, their creativity and technological breakthroughs are impressive. He remains committed to investing in young talent, citing the example of Charlie Noyes, who joined Paradigm at 19 after dropping out of MIT. Noyes played a crucial role in MEV research and Flashbots investment, contributing significantly to the Ethereum ecosystem. Huang likens the Paradigm team to running an 'X-Men Academy,' noting that despite the unpredictability of young employees, their technical skills and innovation often surpass those of traditional professionals.
#GenZ#CryptoInnovation#Paradigm#MattHuang#Ethereum#MEV#Flashbots#Investment#YoungTalent#TechBreakthroughs#XMenAcademy#ETH