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

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #62 · 4 апр.

Когда разрабатываете свой GUI с помощью PyQt для какого-либо софта бывает необходимо позаимствовать цвета из текущего стиля интерфейса. Например, чтобы правильно раскрасить свои виджеты, подогнав их по цвету. Ведь бывает, что ваш GUI используется в разных софтах. Причём некоторые со светлой темой а другие с тёмной. По умолчанию стили наследуются, но если вы задаёте какую-либо раскраску для части виджета через свой styleSheet, то требуется ссылаться на цвета текущего стиля. Как это сделать? Как получить нужный цвет из палитры имеющегося стиля? Это достаточно просто, нужно использовать класс QPalette и его роли. Например, мне нужно достать цвет текста из одного виджета и применить его в другом как цвет фона (не важно зачем именно так, просто захотелось😊). Получаем палитру виджета и сразу достаём нужный цвет, указав его роль. from PySide2.QtGui import QPalette color = main_window.palette().color(QPalette.Text) теперь можем использовать этот цвет в стилях my_widget.setStyleSheet(f'background-color: {color.name()};') Готово, мы динамически переопределили дефолтный стиль используя текущий стиль окна! На самом деле есть запись покороче, в одну строку и без лишних переменных. Не очень-то по правилам CSS, но Qt это понимает. my_widget.setStyleSheet('background-color: palette(Text);') Этот способ не подходит если вам нужно как-то модифицировать цвет перед применением в своих стилях. В этом случае потребуется первый способ. Зато он прекрасно сработает в файле .qss, то есть не придётся в коде прописывать раскраску отдельных элементов через ссылки на палитру, всё красиво сохранится в отдельном файле .qss! QListView#my_widget::item:selected { background: palette(Midlight); } Про имеющиеся роли можно почитать здесь🌍 #qt#tricks

Hashtags

Резултати

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

Пребарај: #narrativewars

当前筛选 #narrativewars清除筛选
Russian Consulate in Cape Town

@rusconct · Post #2804 · 02.07.2025 г., 09:03

🕊️ South African Journalist Gillian Schutte Responds Critically to The Washington Post’s Narrative on Ukrainian Children ✍️ South African Journalist Gillian Schutte has published a critical commentary in response to an article originally published by The Washington Post and later republished by South African news platform IOL. The piece in question details the story of a 12-year-old Ukrainian boy allegedly taken to Russia and later “rescued.” According to Schutte, the article represents a highly stylised narrative designed more to mobilise emotion than to inform public understanding. Her response, titled “The Spectacle of Innocence: How the Narrative of ‘Stolen Children’ Became the West’s Weapon of War,” was published by African Stream and offers a sober reassessment of the narrative widely promoted in Western media regarding alleged “child abductions” during the Ukraine conflict. 📌 Key Points from Schutte’s Analysis: 1. Discrepancy Between Reported Figures and Verified Data Schutte notes the striking difference between media claims and officially documented figures. 🗨 “Ukrainian officials inflate the figure still further: ‘maybe 50,000, maybe 100,000.’ No one knows for sure. No one can prove anything.” 🗨 “According to Russia’s official delegation at the Istanbul peace talks… the only list ever presented to Moscow by Ukraine includes 339 names. Russia says it has already returned 101 of these children.” 2. Lack of Balanced Coverage of Humanitarian Actions She highlights the absence of media attention to cases where Russian forces reportedly evacuated children from conflict zones and facilitated family reunifications. 🗨 “Many [children] were found alone in buildings or hospitals. Others were taken to safety at great personal risk by Russian soldiers, some of whom died in the effort.” 3. Selective Framing of Child Suffering Schutte questions why only certain child stories are given prominence in the international media, often those that reinforce a specific political message. 🗨 “There is no Pulitzer bait in the case of a child returned to a reunited family in Donetsk. These children do not cry in English. They are not crying for NATO.” 4. Historical Pattern of Emotional War Narratives She draws parallels with earlier emotionally charged media campaigns used to justify foreign intervention. 🗨 “Western soft power thrives on emotional shorthand: Saddam’s incubator babies, Gaddafi’s Viagra-fuelled soldiers, and now Putin’s child kidnappers.” 5. A Call for Balanced Humanitarian Concern Schutte urges readers to approach such narratives with compassion — but also with critical thinking and insistence on factual accuracy. 🗨 “We should care for every child affected by war. But we should be suspicious of which children we are told to care about, and why.” 📎 Read the full article (English): 👉https://africanstream.media/opinion/the-spectacle-of-innocence ✍ Author: Gillian Schutte #MediaLiteracy#InformationSecurity#ChildrenInConflict#NarrativeWars#HumanRights#RussiaSouthAfrica#AfricanVoices#GillianSchutte