В фреймворке 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
#ATA/USDT analysis :
#ATA is currently finding support above the 200-period exponential moving average (200 EMA) within the support zone. The price is anticipated to test this zone and maintain its bullish momentum to reach the previous swing high.
TF : 4h
Entry : $0.0900
Target : $0.0983
SL : $0.0850
Currently, #ATAUSDT is compressed within a falling wedge pattern, a classic bullish reversal signal.
Should #ATA fail to bounce back from the $0.0820-$0.0700 support, our eyes will be on the next critical level at $0.0580. Historically, this level has been a stronghold, and the probability of a rebound here is notably higher.
But if $ATA breaks below these key support levels, the bears might take control, potentially leading to a bearish continuation.