В фреймворке 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
Bakemono no Ko
aka The Boy and the Beast | El Niño y la Bestia | バケモノの子
🗓Año 2015
⏱️Duración 119min.
País🇯🇵Japón
🎥Dirección#MamoruHosoda
📄Guion Mamoru Hosoda
🎼Música Takagi Masakatsu
🎬Productora Studio Chizu, Nippon TV
Género#Animación#Fantástico#Amistad#Monstruos#Familia
Reparto | Trailer | Sinopsis | Premios
Ver Aquí
AnexoAnimación | Fantasía | Familia | Premiadas
The Pirates of Dark Water
aka Los Piratas de las Aguas Tenebrosas | Los Piratas de las Aguas Negras
📅Año 1991
⏱️Duración 25min.
🎥Dirección#DonLusk, #PaulSommer, #RayPatterson
📄Guion David Kirschner, Glenn Leopold, Kristina Luckey, David Ehrman, Laren Bright, Lane Raichert, Mark Young, Bill Matheny, Kelly Ward, Flint Dille, Sam Graham, Peter Lawrence, Chris Hubbell, Matthew Malach, Sean Roche, Jim Woodring, Brian Gaughan, Michael Maurer, Kim Costalupes, Mark Kavanaugh
🎼Música Thomas Chase, Steve Rucker
🌆Fotografía Raul Salgado
🎬Productora Hanna-Barbera Productions, Turner Entertainment
📺Emición Fox Kids, ABC
Género#SeriedeTV#Animación#Aventuras#Fantástico#Piratas#Monstruos
Reparto | Intro | Sinopsis
✨Calidad 720p BluRay h264
🖥Resolución 1280x720
🗣Idioma Latino
Episodio01 - 02 - 03 - 04 - 05 - 06 - 07 - 08 - 09 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21
Suscripción a este Anime 👉🏻Aquí
Índice de Series Animadas 👉🏻Aquí