В фреймворке 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
#Altseason is close: altcoin capitalization is preparing a breakout from the descending channel
The guys from #K33#Research are waiting for a new maximum capitalization of the crypto market soon, because 1,051 days have passed since the previous #ATH, and the longest period is 1,106 days.
Meanwhile, #BTC is again trying to break through and gain a foothold above $66k
K33 Predicts Bull Run Peak Date
📈 K33 analysts forecast the peak date of the bull run. ⚖️ Craig Wright receives a conditional sentence for contempt of court. 💵 VC investors are retreating from crypto as the market shifts. 📊 Bitcoin's failure at $100K triggered over $1 billion in liquidations. 🐋 El Salvador expands Bitcoin purchases despite IMF deal. 💬 Tornado Cash co-founder demands dismissal of charges. 👾 Ilya Lichtenstein claims sole responsibility for Bitfinex hack. 💰 Cryptopia clients received $225 million in assets from liquidators. ✅ SEC approves first hybrid ETFs based on Bitcoin and Ethereum. 👁 German regulator orders World to delete user data. 👀 Investors file a lawsuit against the HAWK token team. ⚽️ American football player to receive part of salary in Bitcoin. 🚀 Cathie Wood confirms Bitcoin price prediction above $1 million.
#K33#CraigWright#Crypto#Bitcoin#Liquidations#ElSalvador#TornadoCash#Bitfinex#Cryptopia#SEC#ETFs#Germany#HAWK#Football#CathieWood#Investors#Funding#VentureCapital#Market#Investments
Crypto Highlights: Recent Developments
📈 K33 analysts have predicted the peak date of the bull run.
⚖️ Craig Wright received a conditional sentence for contempt of court.
💵 VC investors are leaving crypto, while crypto distances itself from VC investors.
📊 A Bitcoin crash at $100,000 led to over $1 billion in liquidations.
🐋 El Salvador expanded its Bitcoin purchases despite an IMF deal.
💬 Tornado Cash co-founder demands charges be dropped.
👾 Ilya Lichtenstein claims sole responsibility for the Bitfinex hack.
💰 Cryptopia clients received $225 million in assets from liquidators.
✅ SEC approved the first hybrid ETFs based on Bitcoin and Ethereum.
👁 German regulator ordered World to delete user data.
👀 Investors sued the team behind the HAWK token.
⚽️ An American football player will receive part of his salary in Bitcoin.
🚀 Cathy Wood confirmed her Bitcoin price prediction exceeds $1 million.
🤑 Colin Wu shared the success story of a 24-year-old crypto trader.
#K33#CraigWright#VC#Bitcoin#Liquidation#ElSalvador#TornadoCash#Bitfinex#Cryptopia#SEC#ETFs#Germany#HAWK#Football#CathyWood#CryptoTrader#CryptoNews#Investments#MarketTrends#CryptoRegulation#Blockchain