В фреймворке 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
#RAD/USDT analysis :
#RAD is currently experiencing a bearish trend, trading below the 200 EMA. The price is forming lower lows (LLs) and lower highs (LHs).
At present, it is testing the resistance zone along with the 200 EMA. A reversal is anticipated from this level, allowing the price to resume its bearish momentum and potentially test lower levels.
TF : 1H
Entry : $0.840
Target : $0.779
SL : $0.875
#RAD/USDT analysis :
#RAD has broken out and retested the previous support levels. It is expected to reject from the current level and test lower levels.
TF : 1h
Entry : $1.209
Target : $1.127
SL : $1.268