В фреймворке 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
#STPT/USDT analysis :
#STPT is moving upside to retest the 200ema before continuing bearish momentum. This creates long trade opportunity on LTF. Current level is good for long trade.
TF : 1H
Entry : $0.07836
Target : $0.08530
SL : $0.07377
#STPT/USDT analysis :
#STPT is in an uptrend and trading above the 200 EMA. The price is expected to rebound and resume its bullish momentum. For a long entry, wait for a breakout above $0.08867, which could lead to testing previous highs.
TF : 1h
Entry : $0.08867
Target : $0.09781
SL : $0.08377
Weekly RSI Detections by CoinLegs 🪙
If you are a long term trader, this post is just for you.
We sorted all the coins by RSI weekly values.
#STRAX#STPT#MKR#SUI#CAKE#PEPE
We have bunch of useful tools on CoinLegs platform. Join us!