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

Пребарај: #riverlea

当前筛选 #riverlea清除筛选
Addis Standard

@addisstandardeng · Post #21685 · 12.03.2026 г., 05:29

#South_Africa deploys soldiers to the streets to tackle organized and violent crime Soldiers were deployed to the streets of South Africa’s biggest city Wednesday in an effort to help police fight gang violence and illegal mining. It was the first major deployment since President Cyril #Ramaphosa said in his annual speech to the nation last month that he would use the army against organized crime, which he called the greatest threat to democracy and the country’s economic development. Soldiers jumped from vehicles and entered apartment blocks as military vehicles moved through the #Riverlea and #Westbury suburbs of #Johannesburg. Many residents of Riverlea expressed relief to see soldiers deployed to stem the violence. One resident, Pearl Hilma, told The Associated Press that she supports the crackdown “because there’s lots of gangsterism as well as gunshots every night” in the neighborhood...... https://apnews.com/article/johannesburg-troops-crime-crackdown-president-d92dd6dc8eea76bdf1abd878200379f9