В фреймворке 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
🤔#LDO Financial indicators for Lido in 2025 show that total revenue decreased by 23% on an annual basis to $40.5 million, with net staking commission revenue amounting to $37.4 million.
The DAO is evaluating a potential LDO buyback program in the second quarter of 2026. link
#LDO/USDT analysis :
#LDO is in a downtrend, currently rejecting from the 200 EMA resistance after going through a correction phase. It is expected to continue its bearish momentum and test the previous swing low. Wait for the break of the $1.091 level downside for a short entry.
TF : 15min
Entry : $1.091
Target : $0.993
SL : $1.153
#LDO/USDT analysis -
#LDO has recently broken out of the channel after facing rejection from the 200 EMA in a downtrend. It is now expected to continue its downward momentum and test new lows.
TF : 2H
Entry : $1.530
Target : $1.398
SL : $1.604