В прошлом посте говоря "Все вызовы теперь одинаковы" я несколько слукавил. Всё-таки есть в этом зоопарке версий некоторая несовместимость вызов которой просто так не унифицировать. Эти моменты вынесены в отдельный модуль 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
🚀 Join us on a journey to revolutionize the world of asset #tokenization and #engagement!
🌍 Our mission is clear: empower individuals and enterprises globally through innovative solutions, strategic partnerships, and #community-driven initiatives.
Learn more at: https://goplatform.io/blog/revolutionizing-enterprise-engagement-the-power-of-asset-tokenization-with
Together, we can create a transformative ecosystem where everyone has the opportunity to thrive.
🌞 Bonjour à tous nos chers abonnés ! 🌍🫵🏽
Nous vous souhaitons un excellent mercredi rempli d'énergie et de détermination. ✨💪🏾La lutte continue, restons unis et solidaires !
#Force#Engagement#Ensemble
@egountchibehanzinTV
Channel: Instagram Accounts & Services
Members: ~3.49K
💢 Username: @buyinstaaccounts
Description:
We Sell Instagram Accounts, Followers, Likes, Views, Commmets Or Any Other Service Regarding Instagram. With 8 Years Of Experience.
🏷 Tags: #games_apps
#instagram#accounts#social_media#followers#engagement
https://telegramchannels.me/channels/buyinstaaccounts
TVision Secures $1.5M Funding
TVision has raised $1.5M in funding as of December 16, 2024. The company utilizes advanced computer-vision technology to analyze viewer engagement for both Linear and CTV, offering person-level insights into viewing habits.
#Funding#TVision#Technology#ViewerEngagement#CTV#Linear#Insights#ComputerVision#Analytics#Viewership#Audience#Engagement#Media#Streaming#Data#Research#Investment
Telegram Unveils Major NFT Update
🎉 Telegram introduces a big update allowing gifts and stickers to be converted into NFTs. Gifts gain unique traits like emotions, backgrounds, and colors, enhancing their individuality and value. Rare traits will be limited to 10% of users, creating opportunities for resale at higher prices. Gifts can be converted for 25 Stars, while minting NFTs incurs network fees. Future integration with platforms like Fragment or GG is expected for seamless NFT creation. 🐸 The latest highlight is a unique frog gift gaining traction!
For more details, visit: Full Update
#Telegram#NFT#Gifts#Crypto#Updates#Blockchain#Stars#Minting#Fragment#GG#Frogs#RareItems#DigitalAssets#Community#Market#Trading#Tech#Innovation#SocialMedia#Engagement#CryptoTrends
AI Video Editor Raises $500K
Diffusion Studio has secured $500K in funding as of December 4, 2024. Their AI Video Editor simplifies video editing with advanced features such as Magic Cut, Text-Based Editing, and Instant Auto-Captioning, catering to creators and businesses aiming to enhance their video production efficiency.
#AI#VideoEditing#Funding#Technology#Creators#Influencers#Business#Automation#Software#Innovation#EditingTools#VideoProduction#TextBasedEditing#AutoCaptioning#Workflow#Engagement#Professional#ContentCreation#Creativity#Efficiency