В фреймворке 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
#SYS/USDT analysis :
The #SYS is currently in a downtrend, trading below the 200EMA. The price is testing resistance at the current level, and it's expected to decline further from there, potentially testing lower price levels.
TF : 2h
Entry : $0.0487
Target : $0.0410
SL : $0.0522
#SYS/USDT analysis :
#SYS is currently in a correction phase, experiencing a retracement toward the 200 EMA. This presents a potential long trade opportunity on lower time frame. Look for price to retrace and test the support zone for a long entry.
TF : 30min
Entry : $0.0676
Target : $0.0735
SL : $0.0644
#SYS/USDT analysis :
#SYS is currently consolidating sideways within the support zone and is expected to rebound from this level, potentially testing previous highs. It is advisable to wait for a pullback to establish a long position.
TF : 1D
Entry : $0.0964
Target : $0.1257
SL : $0.0822
BUYING $SYS HERE
Exchange: Binance / Binance Futures
Leverage: 3-5x
Breakout confirmed. Market conditions are perfect for an easy 100-200% move on #SYS
Targets: OPEN
SL: Below 0.0254
#SYS result
2 nd target achieved in just 11 hours ✅✅
One more huge quick profit 17% +🤑💰🤑
👉 Still thinking? The more you wait more you lose profit
☎️ Contact @MichaelStrategiesVip for membership and grab next breakout signal