В фреймворке 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
#BNX/USDT analysis :
#BNX has experienced a significant drop of approximately 74% from its peak and has found support at a previously respected support zone. The price is currently forming a double bottom reversal pattern at this critical level. It is expected that the price will bounce back from this zone and continue to rise, targeting previous highs.
TF : 1D
Entry : $0.5600
Target : $1.6045
SL : $0.4026
#BNX 30m indicator strategy
👨✈️
GG-Shøt caught the trend at 0.26 - the rest is history /// 😘^^
+4159% max profit (10x lev)
+8318% max profit (20x lev)
The chart speaks for itself.
Others watch
🕺 We execute.
#BNX result
All target achieved in just 6 days ✅
One more huge quick profit 25%🤑💰🤑
👉 Still thinking? The more you wait more you lose profit
☎️ Contact @MichaelStrategiesVip for membership and grab next breakout signal
#BNX result
3 nd target achieved in just 6 house ✅✅✅
One more huge quick profit 18.6%🤑💰🤑
👉 Still thinking? The more you wait more you lose profit
☎️ Contact @MichaelStrategiesVip for membership and grab next breakout signal