В фреймворке 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
#VIDT/USDT analysis :
#VIDT is expected to retrace to a buying zone before bouncing back and breaking above the 200 EMA. Wait for a retest for a confirmed long entry, as this will lead to higher price targets.
TF : 1h
Entry : $0.02747
Target : $0.03040
SL : $0.02560
#VIDT result
1st target achieved in just 6 minutes ✅
One more quick profit 3%+💰🤑
👉 More quick profit signals available in premium channel. Hurry up 🏃♂👇
☎️ Contact @MichaelStrategiesVip
Rose Army - Best Performances in past few months:
#ALCH x5
#LAYER x4
#FART x3
#CHEEMS x2
#BROCCOLI x2
#VIDT x2
#MEMEFI x2
And many alts did +(30-70)%
Also few got stopped out
Be sure that Risk management is key - Managing the risk is more important than earning money.