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 слични објави

Пребарај: #entry

当前筛选 #entry清除筛选
Writers Cafe

@WritersCafe · Post #115 · 13.05.2018 г., 07:46

​​Mother's Day: A day to rejoice and cherish the motherhood. We must celebrate the bond mothers have towards their children, therefore we call it a surprise challenge for each one of you who love your mom! It is the day to celebrate their presence and blessings in our lives. Let's write anything like a poetry/prose/short story or whatever you want (within 10 sentences) to express the love for Mom. Note: The best three entries will be posted in @PensivePost with your names to credit. “And all my mother came into mine eyes. And gave me up to tears.” - by William Shakespeare, Henry V (1599) » please send: #entryand then your write-up to the bot using the button below » Do not forget to mention your personal identifier like (#ws for William Shakespeare if your name is William Shakespeare) » #mom for the challenge identifier » This challenge ends in next 8 hours and the results will be posted today itself at the closing of this challenge.