В фреймворке 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
⭐️#GBPUSD: Weak Market & Bearish Continuation
The charts are full of distraction, disturbance and are a graveyard of fear and greed which shall not cloud our judgement on the current state of affairs in the 📉GBPUSD pair price action which suggests a high likelihood of a coming move down.
📊
🔅GBPUSD Will Move Lower! Short!📉
- - - - - - - -
Take a look at our analysis for 📊GBPUSD.
The market is approaching a significant resistance area 1.352.
Due to the fact that we see a positive bearish reaction from the underlined area, I strongly believe that sellers will manage to push the price all the way down to 1.345 level.
- - - - - - - -
#freesignal#gbpusd
- - - - - - - -
🌐Free Copy Trading: Link
📲Join VIP via Bot:Link
❓Official Contact:@signalprovidercontact
🔅GBPUSD Is Going Up! Long!📈
- - - - - - -
Please, check our technical outlook for 📊GBPUSD.
The market is approaching a key horizontal level 1.349.
Considering the today's price action, probabilities will be high to see a movement to 1.351.
- - - - - - - -
#freesignal#gbpusd
- - - - - - - -
🌐Free Copy Trading: Link
📲Join VIP via Bot:Link
❓Official Contact:@signalprovidercontact
🔅GBPUSD Will Go Down! Short!📉
- - - - - - - -
Please, check our technical outlook for 📊GBPUSD.
The market is testing a major horizontal structure 1.321.
Taking into consideration the structure & trend analysis, I believe that the market will reach 1.315 level soon.
- - - - - - - -
#freesignal#gbpusd
- - - - - - - -
🌐Free Copy Trading: Link
📲Join VIP via Bot:Link
❓Official Contact:@signalprovidercontact