Для тех кто пишет расширения на PyQt/PySide для CG-софтов.
Когда я только начинал писать тулзы под Maya (тогда еще версия 2010-2011) мне приходилось ручками ставить PyQt4 под Maya. Даже написал мануалы по установке на своём сайте. Но потом стал доступен из коробки PySide и позже он обновится до PySide2. Для некоторых систем была поддержка PyQt5.
И как простому разработчику поддерживать этот зоопарк? Ведь хочется чтобы тул работал на любой версии (вы тоже делали модуль что-то типа import_qt.py?😁)
На помощь приходит проект Qt.py который поставил себе цель унифицировать использование Qt-биндингов вне зависимости от среды где запускается код. Те, кто давно пишут на Qt, скорее всего знают этот проект.
Он стал стандартом для CG-индустрии и используется в топовых студиях и проектах.
Qt․py помогает запускать один и тот же код на разных платформах с разными вариантами Qt-библиотек. Это может быть как интеграция в CG-софт, так и переносимость стендалонов между разными платформами с разными версиями Python.
Я решил рассказать о некоторых особенностях работы с этой библиотекой.
Сегодня о том, как установить и использовать Qt․py и что это вам даёт.
Установка
pip install Qt.py
Чтобы начать использовать Qt․py в коде достаточно заменить импорт вашего варианта Qt-биндинга на Qt․py
from [PySide|PyQt4|PySide2|PyQt5] import QtWidgets
=>
from Qt import QtWidgets
Теперь ваш код будет поддерживать любой вариант биндинга Qt в Python.
При этом не потребуется использовать if-else конструкции под разные версии. Все вызовы теперь одинаковы.
Всё что нужно сделать, это написать его по правилам PySide2. Именно эта версия была взята за основу.
Приоритет импорта такой:
1. PySide2
2. PyQt5
3. PySide
4. PyQt4
Что именно загрузилось можно посмотреть в переменной __binding__
>>> import Qt
>>> Qt.__binding__
'PySide2'
Приоритет имопрта можно изменить через переменные QT_PREFERRED_BINDING и QT_PREFERRED_BINDING_JSON. Причем под каждый проект оверрайды можно настраивать индивидеально.
#qt#libs
The long-awaited listing of the token from Fanton Fantasy
🟨 We would like to remind you that #FTON is a utility token of the Fanton Fantasy project, necessary for playing in their tournaments. Token holders will be able to participate in betting and ⛏ farming, receive in-game bonuses, and also have the exclusive right to purchase NFT cards of the project.
↗️ The listing of $FTON will take place on October 1 at 13:00 UTC (16:00 Moscow time) on three CEX exchanges at once: Kucoin, Gate.io , MEXC. In our 🪙#TON network, the pool will appear at 13:15 UTC and unfortunately only on 1 DEX exchange – Ston.FI. At the same time, the team itself states that they are working with other sites on the token listing, so we are waiting for announcements.
➖After listing, life is just beginning, and we will begin to systematically increase the utility for $FTON, both for Fanton Fantasy players and ordinary cryptans!
The team also reminded us that Notcoin and Tonstarter are among their key partners:
➖Over the past 1.5 years, we in the Fanton team have held many calls with the creators of the best platform for social campaigns — Community, as well as Notcoin, which blew up TON and Telegram in early 2024.
➖Since then, we have been calling the guys weekly, maintaining a connection on the topic of launchpads and launching ⚽️ $FTON, received expertise and connections, and are finally close to launching our utility token.
Fanton | News | Chat | ChainGPT
Fanton EN: New Legendary NFTs and Staking 2.0
#NFT#FTON
Fanton EN presents the new Staking 2.0, featuring a convenient chart and distinguished Legendary NFTs, including players like Batrakov and Osipenko. The first round of NFT distributions for FTON stakeholders will start tomorrow. Participants can exchange injured NFTs through support.
Source: link
@tonlines
⚡️Fanton EN: Launch of Staking 2.0
#Fanton#FTON#NFT
Fanton EN channel has announced the launch of Staking 2.0 in the game, offering lucrative opportunities for players. By staking $FTON tokens, participants can earn rewards surpassing the token’s value and receive additional NFTs. Important deadline: Stake before April 19 to secure your NFT before the 25th RPL round.
Source: link
@tonlines
⚡️Fanton EN: Launch of Staking 2.0 with NFTs and Tournaments
#FANTON#NFT#FTON
Fanton EN introduces Staking 2.0, featuring NFTs, tournaments, and appealing bonuses. Participants can stake FTON in four different pools, each offering unique rewards like NFT cards, tournament entry, and up to 10% APY. The update includes guaranteed RPL NFTs and the opportunity to join exclusive pools with limited slots.
Source: link
@tonlines
⚡️Fanton EN: May Leaderboard Kicks Off with New Rewards
#FTON#NFT#RPL
Fanton EN has announced the results for April with $FTON and NFT card distributions to players. The May Leaderboard requires participants to earn at least 50 trophies to share a 1 million $FTON prize pool. Top players will also receive Rare RPL cards, selected based on rank.
Source: link
@tonlines
🏷 Start of presale from Fanton
🟡Placement will take place on August 7th at 11:00 UTC on the Magic Square platform
🟡Presale price – $0.023 (5% discount to the IDO price)
🟡Total raised amount – $150,000
🏆 We want to remind you that $FTON is a utility token for the Fanton Fantasy game, necessary for playing in project's tournaments. Token owners will be able to participate in staking and ⛏ farming, receive in-game bonuses, and also have exclusive right to purchase NFT cards of the project.
The first part of FCFS/Whitelist Round:
🟨Create an account on Magic Square and go through KYC
🟨Use wallet which completed the Zealy campaign
🟨Click "Join Whitelist"
Second part of the ProRata Round will begin on August 8th at 11:00 UTC.
📊 Allocation will depend on thr amount you contributed in relation to other participants. Trading with other users (until TGE) will appear on Magic Square OTC marketplace. More information in detailed guide - link here.
#fanton#magicsquare#fton