@WorldNews · Post #73864 · 04.04.2026 г., 15:59
US agents arrest niece of Iran's Qassem Soleimani after Rubio revoked green card [Read FullArticle] @WorldNews#IranNews#USPolitics #Soleimani#
Hashtags
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
Пребарај: #uspolitics
@WorldNews · Post #73864 · 04.04.2026 г., 15:59
US agents arrest niece of Iran's Qassem Soleimani after Rubio revoked green card [Read FullArticle] @WorldNews#IranNews#USPolitics #Soleimani#
Hashtags
@WorldNews · Post #74302 · 22.04.2026 г., 19:14
Iran more capable than Trump administration is publicly acknowledging, sources say [Read FullArticle] @WorldNews#Iran#USPolitics#WorldNews
Hashtags
@WorldNews · Post #74066 · 12.04.2026 г., 13:29
Trump says U.S. will blockade Strait of Hormuz after Iran peace talks fail [Read FullArticle] @WorldNews#USPolitics#IranNews#StraitOfHormuz
@WorldNews · Post #73785 · 01.04.2026 г., 22:04
Trump to declare Iran war is winding down and others need to resolve Hormuz [Read FullArticle] @WorldNews#IranNews#MiddleEast#USPolitics
Hashtags
@America · Post #10371 · 11.03.2026 г., 18:04
🚨🇺🇸WHITE HOUSE BATTLE: TIGHT POLLS, ECONOMIC FEARS DOMINATE 🔹 Reuters/Ipsos poll shows Biden & Trump neck-and-neck in PA & AZ, within 2%, highlighting a competitive electoral landscape. 📊 🔹 Youth vote crucial: 60% of 18-29 year olds show strong intent to participate, key to swaying outcome. 🗳️ 🔹 Economy dominates: 75% of voters cite inflation, job growth, & cost of living as top issues. Candidates urged to address pocketbook matters. 💰 🔹 Political analysts foresee intense scrutiny on every campaign event. Path to 270 electoral votes remains unpredictable. 📈 The race for the White House heats up! 👀🔥 #USPolitics#Election2024#Economy @america
Hashtags
@WorldNews · Post #73591 · 25.03.2026 г., 10:19
Iran military spokesperson says US is negotiating with itself [Read FullArticle] @WorldNews#IranNews#USPolitics#MiddleEastSecurity
@WorldNews · Post #73757 · 31.03.2026 г., 20:49
Hegseth Says U.S. Will 'Negotiate With Bombs' Until Iran Cease-Fire Deal Is Reached [Read FullArticle] @WorldNews#IranDeal#USPolitics#MiddleEastNews
@WorldNews · Post #73762 · 31.03.2026 г., 23:39
Trump says U.S. will leave Iran in 'two or three weeks' [Read FullArticle] @WorldNews#TrumpNews#IranPolicy#USPolitics
Hashtags
@WorldNews · Post #73736 · 30.03.2026 г., 23:34
Trump interested in calling on Arab states to help pay for Iran war, White House says [Read FullArticle] @WorldNews#IranWar#ArabStates#USPolitics
Hashtags
@WorldNews · Post #73596 · 25.03.2026 г., 14:39
'We negotiate with bombs': US secretary of war Pete Hegseth's warning to Iran as Trump talks peace [Read FullArticle] @WorldNews#IranConflict#USPolitics#PeaceNegotiations
@ethereumglobalnews · Post #1187 · 24.10.2025 г., 05:35
🖼 Trending now: #CryptoPolitics - Major crypto firms back Trump’s White House fundraiser. #Regulation#USPolitics 🇺🇸 最新消息:Coinbase、Ripple、Tether 以及 Winklevoss 雙子星等多家加密企業,均為川普白宮宴會活動的主要捐助者之一。 此舉被視為加密產業加強與政治接軌的關鍵信號,或將影響未來監管與政策走向。 #Insight @EthereumGlobalNews Follow for more global Web3 & DeFi updates!
@american_observer · Post #5554 · 03.04.2026 г., 20:58
Trump Sells a War. The Public Sees the Bill. Donald Trump made the strongest case he could for the Iran war, but the country is looking at something else: higher oil prices, a shaky exit plan, and a conflict that could still blow back into a global recession. The problem is not just persuasion — it is trust, and Trump is running low on it. That is why the speech landed badly. He talked like a man promising control, while markets heard uncertainty and voters heard gas at more than $4 a gallon. Even Trump’s insistence that the Strait of Hormuz would “naturally” reopen did not calm fears that the war could keep the world economy hostage. The political danger is already measurable. A CNN analysis said the war is hitting Trump’s presidency at the exact moment his approval is already fragile, while oil markets jumped again on fresh fears of escalation. If Washington wants out, it will need a way to leave that does not look like surrender. That is where intermediaries matter, and Russia is one of the few players with enough leverage in Tehran to help package an exit without Trump admitting defeat. #Trump#Iran#oilprices#Russia#USpolitics 📱American Оbserver - Stay up to date on all important events 🇺🇸