В фреймворке 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
📩#BNBUSDT 30m | Mid-Term
📉Long Entry Zone: 560.11-543.61
🎯 - Strategy Accuracy: 89%
⏳ - Signal details:
Target 1: 564.04
Target 2: 567.41
Target 3: 570.77
Target 4: 580.86
_
🧲Trend-Line: 543.61
❌Stop-Loss: 540.34
💡After reaching the first target you can put the rest of the position to breakeven
📩#BNBUSDT 30m | Mid-Term
📉Long Entry Zone: 566.42-543.30
🎯 - Strategy Accuracy: 89.78%
Last 5 signals: 100.0%
Last 10 signals: 100.0%
Last 20 signals: 100.0%
⏳ - Signal details:
Target 1: 569.14
Target 2: 571.86
Target 3: 574.58
Target 4: 582.73
_
🧲Trend-Line: 543.30
❌Stop-Loss: 540.70
💡After reaching the first target you can put the rest of the position to breakeven
After falling from the support level of $500.0, #BinanceCoin reached the support level of $400.0 and recovered and is now trading above both levels.
As you can see in the chart, a dynamic resistance still prevents #BNBUSDT growth, so in the first step, crossing and breaking this resistance can be a sign of the continuation of the upward trend in the daily time frame.
So far, BNBUSDT has hit the dynamic resistance 2 times and failed to break it, these collisions may reach up to 5 times and then the price will start to grow. The current price movement scenario is between the $400.0 support and the dynamic resistance.
📩#BNBUSDT 30m | Mid-Term
📉Short Entry Zone: 619.76-636.57
🎯 - Strategy Accuracy: 93.69%
Last 5 signals: 100.0%
Last 10 signals: 95.0%
Last 20 signals: 96.77%
⏳ - Signal details:
Target 1: 616.04
Target 2: 612.32
Target 3: 608.60
Target 4: 597.45
_____
🧲Trend-Line: 636.57
❌Stop-Loss: 640.39
💡After reaching the first target you can put the rest of the position to breakeven
#ID20000037367