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

Резултати

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

Пребарај: #stellenbosch

当前筛选 #stellenbosch清除筛选

🍇🚋 Franschhoek Wine Valley Discover the beauty of the Franschhoek Wine Valley on board the famous Wine Tram🚋 — a hop-on, hop-off experience that lets you explore at your own pace, just 75 km east of Cape Town. 🏞 With 10 different routes, every journey offers something special: ✨ world-class wine tastings 🍷 ✨ guided cellar tours 🛖 ✨ leisurely vineyard lunches 🍽 ✨ peaceful walks among the vines 🌿 The town of Franschhoek — meaning “French Corner” — is part of the Stellenbosch Municipality. Stellenbosch itself is South Africa’s second-oldest town and today stands as a vibrant center of winemaking, gastronomy, art, and culture. 🌍 #Wine#Travel#SouthAfrica#Franschhoek#Stellenbosch#CapeTown

🗓December 3 marks the birthday of Huberte Rupert (1919–2005), a South African philanthropist and art enthusiast whose legacy shaped cultural and social development in the country. 🎨💛🇿🇦 She co-founded the Rupert Museum and supported numerous initiatives in education, healthcare, and the arts. 🖼 The Rupert Museum houses a remarkable collection of modern South African art from the 1940s to the early 2000s. It is located in Stellenbosch, just 50 km east of Cape Town. Her husband, Anton Rupert, was a prominent South African businessman. #SouthAfrica#Art#Culture#Philanthropy#HuberteRupert#RupertMuseum#Stellenbosch