В фреймворке PyQt (и PySide тоже) часто встречается настройка чего-либо с помощью так называемых флагов.
widget.setWindowFlags(Qt.Window)
Взаимодействие нескольких флагов делается с помощью бинарных (или побитовых) операторов.
Несколько флагов можно указать с помощью оператора "|"
list_item.setFlags(Qt.ItemIsSelectable | Qt.ItemIsEnabled)
исключить флаг из уже имеющегося набора можно так
list_item.setFlags(list_item.flags() ^ Qt.ItemIsEnabled)
Добавить новый флаг к имеющимся можно так
list_item.setFlags(list_item.flags() | Qt.ItemIsEnabled)
А проверка наличия делается так
is_enabled = item.flags() & Qt.ItemIsEnabled > 0
Почему именно так? Всё дело в том как именно работают побитовые операторы. Но об этом в следующем посте.
#qt
Upbit @Official_Upbit and Bithumb @BithumbOfficial
announced support #UXLINK token swap!
https://upbit.com/service_center/notice?id=5708
https://feed.bithumb.com/notice/1650509
#UPBIT#Web3Community
🎃 Happy Halloween to our amazing community! 🕸️
May your wallets be full (of treats, not tricks) and your Web3 journey filled with magic. 👻🪄
Stay spooky, stay connected — with love from the #UXLINK family 💜
#HappyHalloween#Web3Community#UXLINK#CryptoFam#StayConnected
𝐌𝐨𝐬𝐭 𝐖𝐞𝐛𝟑 𝐥𝐚𝐮𝐧𝐜𝐡𝐞𝐬 𝐟𝐚𝐢𝐥 𝐛𝐞𝐜𝐚𝐮𝐬𝐞 𝐮𝐬𝐞𝐫𝐬 𝐣𝐨𝐢𝐧 𝐭𝐨𝐨 𝐥𝐚𝐭𝐞 𝐨𝐫 𝐦𝐢𝐬𝐬 𝐭𝐡𝐞 𝐟𝐢𝐧𝐚𝐥 𝐬𝐭𝐞𝐩𝐬
But now it’s the final straight for $G360
🚀
If you want to participate in the future distribution of the $G360 token, follow the steps below:
🔗 Go through the invite link
❗️ Complete KYC
🕓 Wait for the next instructions and upcoming steps
This is already the final stage, so don’t miss your chance.
✅𝐋𝐢𝐧𝐤 𝐭𝐨 𝐣𝐨𝐢𝐧:
https://pad.sigma3.gpt360.io/invite?ref=rRs7poAyLPVN7q4KGgv7eu
✅𝐀𝐛𝐨𝐮𝐭 𝐒𝐢𝐠𝐦𝐚𝟑:
https://docs.gpt360.io/sigma3-launchpad
#Web3#Crypto#Airdrop#Token#Blockchain#Web3Community#Sigma3#GPT360#G360