TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

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

Резултати

Пронајдени 1 слични објави

Пребарај: #architectureplans

当前筛选 #architectureplans清除筛选
URA Singapore

@URASingapore · Post #732 · 01.03.2024 г., 10:00

🤔Did you know: during the Victoria Theatre’s refurbishment, its clock (constructed in 1906) was sent back to its original manufacturer in the UK to be restored 🇬🇧🕰️ 👀 Take a peek at over 500 drawings and artefacts from the Singapore Architecture Collection that are being showcased to the public for the first time, only at the ‘To Draw An Idea’ exhibition. To sign up for a free guided tour or talk, head over to 👉https://go.gov.sg/TDAI-programmes #exhibition#freeexhibition#architecturesg#architectureplans#discoversingapore