@TFGames · Post #2077 · 02.02.2024 г., 19:28
#LEGEND#MMO#GAMES https://testflight.apple.com/join/IIDOkGHE
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
Пребарај: #legend
@TFGames · Post #2077 · 02.02.2024 г., 19:28
#LEGEND#MMO#GAMES https://testflight.apple.com/join/IIDOkGHE
@TFGames · Post #1937 · 17.01.2024 г., 05:09
#HSO#LEGEND#GAMES https://testflight.apple.com/join/wj539bhT
@TFGames · Post #1588 · 21.12.2023 г., 06:23
#HIQUN#LEGEND#GAMES https://testflight.apple.com/join/pEmXIzPy
@bishdvizh · Post #2246 · 25.05.2024 г., 06:00
Один из ключевых летних привозов для поклонников электронной музыки состоится 19 июля. Алматы впервые посетит именитый японец ¥ØU$UK€ ¥UK1MAT$U, который является яркой фигурой андеграунда Японии. Его выступление в Алматы станет последним в рамках его летнего тура. BONUS that we deserve: https://www.youtube.com/live/WvyvwlowHWM?si=21Q6cN70A6szW6W6&t=1357 -- -- -- -- @AlmaDvizh#legend#epic#dj
@interesting_planet_facts · Post #1099 · 04.12.2025 г., 18:11
🌎 The Aztec legend of Quetzalcoatl describes a feathered serpent god who brought knowledge and culture to people. Spanish chronicles report Aztecs believed Quetzalcoatl created humans by mixing his blood with ground bones from the underworld. ✨ #aztecs⚡#mythology⚡#legend 👉subscribe Interesting Planet 👉more Channels
Hashtags
@FCBayernEN · Post #224002 · 28.01.2026 г., 18:36
FC Bayern (TikTok) Last time Robben faced Eindhoven – and got 𝒄𝒉𝒆𝒆𝒓𝒆𝒅 by both sides. 🥹#PSVFCB#Robben#FCBayern#Legend
@itsmealexaliza · Post #1056 · 10.10.2024 г., 08:11
India has lost a legend today. Ratan Tata, an extraordinary industrialist, visionary, and humanitarian, has left us. His contributions to the business world and society are unparalleled. He was not just a leader but an inspiration, embodying humility, integrity, and compassion. The legacy he built through the Tata Group and his philanthropic efforts will continue to inspire generations to come. Rest in peace, Ratan Tata Sir. You will forever be in our hearts. 🙏 #RIPRatanTata#Legend#EndOfAnEra”
Hashtags
@WangZhuanZhan · Post #34486 · 28.10.2024 г., 06:17
T-t天t云y山s传c奇q- 天云山传奇 (1981) 直达链接:https://pan.quark.cn/s/4d9cd30ac70c #天云山传奇 #Legend of Tianyun Monutain 链接:https://link3.cc/sf_com #电影#爱情#内地#80年代
@NewsAndTipsNT · Post #4028 · 27.01.2026 г., 02:42
My brother Pavel Durov! 💪 In a world where governments are tightening their grip on our freedoms, big respect to Pavel Durov, the unbreakable force behind Telegram! This man is a true fighter: exiled from Russia for refusing to sell out user data, building an empire on privacy and free speech, and now calling out the EU’s “war against privacy” with their impossible rules that punish innovation. He’s warning us we’re running out of time to save the free internet from a dystopian nightmare of surveillance and censorship. Even after his arrest in France and being blocked from speaking at freedom forums, he stands firm, removing harmful content without compromising principles. Pavel, you’re a legend and you are inspiring entrepreneurs and rebels everywhere to never back down. You are a dear friend and a loyal brother and I stand alongside you all the way 100%! #PavelDurov#FreeSpeechWarrior#Telegram#Legend - Conor McGregor
@WangZhuanZhan · Post #34638 · 31.10.2024 г., 14:28
Y-y夜y宴y- 夜宴 (2006) 直达链接:https://pan.quark.cn/s/8f1e6e2988b7 #夜宴 #The Banquet #Legend of the Black Scorpion 链接:https://link3.cc/sf_com #电影#爱情#内地#00年代
@testflightynoti · Post #37890 · 09.05.2026 г., 17:10
#Legend#Trade#Anything Join the Legend - Trade Anything beta on ✈️#TestFlight 🔗 Link: https://testflight.apple.com/join/995ABCHQ Shared by Dimitri
@dopingram · Post #2600 · 16.07.2023 г., 12:51
Au revoir Jane Birkin! (14 décembre 1946 - 16 juillet 2023) "КРАСНАЯ ПЛЕНКА", холст, картон, акрил, 70х50см, Doping Pong, 2020 #dopingpong#red#film#ussr#retro#legend#technology