@ElRincon_delConsejero · Post #4974 · 06.05.2025 г., 16:05
#IsaacAsimov
Hashtags
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #45 · 2 мар.
В фреймворке 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
Hashtags
Пребарај: #isaacasimov
@ElRincon_delConsejero · Post #4974 · 06.05.2025 г., 16:05
#IsaacAsimov
Hashtags
@googlefactss · Post #40903 · 06.04.2026 г., 00:05
Isaac Asimov died on April 6, 1992. He created the Three Laws of Robotics. These laws state that a robot cannot harm a human, must obey humans, and must protect itself unless this conflicts with the first two laws. 🤖📚 [Read more 1] [Read more 2] @googlefactss #IsaacAsimov#Robotics#ScienceFiction#DidYouKnow
@googlefactss · Post #40459 · 02.01.2026 г., 03:04
Isaac Asimov was born on January 2, 1920. He wrote the Three Laws of Robotics: 1. Robots can't harm humans or let them be harmed. 2. Robots must follow human orders unless it breaks the first law. 3. Robots must protect themselves unless it breaks the first or second law. 🤖📜 [Read more] @googlefactss #IsaacAsimov#Robotics#ThreeLaws#ScienceFacts