В фреймворке 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
After this reset, you will begin the New Earth timeline with new belief systems will guide you. But that is in the future.
For today, create boundaries with both the past and the future so you can simply be in this here and now moment.
The past no longer defines you. The future is what you decide upon.
Yah bless 🌹 Love Carolyn
✨ Get your FREE Quantum Energy Balancing & Tune-up https://www.144godcode.com/freebie
#timeline#newearth#reset#rebirth#therealyou #144000 #144GODCODE#APTTMH
When the Feminine aspects of self are safe and supported, she can focus on her role as the oracle.
When the Masculine creates sacred space for her, she can easily relax and connect to the Quantum field, accessing information directly from the One Monad.
Then you can harness the knowledge from Source Consciousness and apply it to being a conscious creator of the lifestyle you desire to have.
✨ Get your FREE Quantum Energy Balancing Tune-up https://www.144godcode.com/freebie
Yah bless 🌹 Love Carolyn
#divinefeminineenergy#divinefemininerising#oracle#divinemasculine#quantumhealing#144GODCODE#APTTMH