В фреймворке 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
#ALCX/USDT analysis :
#ALCX is in a downtrend, forming lower lows (LLs) and lower highs (LHs) below the 200 EMA. The price is currently facing resistance and is anticipated to decline from there, testing lower levels.
TF : 2H
Entry : $10.12
Target : $9.30
SL : $10.74
#ALCX/USDT analysis :
#ALCX is in a downtrend and trading below the 200 EMA. The price has broken down below the support zone and is now retracing back to retest the broken zone before continuing the bearish momentum. For a short entry, wait for the price to test the resistance zone.
TF : 2h
Entry : $12.10
Target : $10.51
SL : $13.20
#ALCX👈
https://www.binance.com/en/trade/ALCX_BTC
Buying Zone 630-660
👆
We are expecting a bull run in this coin in coming days
Sell
🤑730-750
🤑750-800
🤑800-850
🤑 850-900
🤑 900-1000
🚀 1000-1100
🚀 1100-1200 & above
Bullish above 600