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

Резултати

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

Пребарај: #mobilegaming

当前筛选 #mobilegaming清除筛选
DeckForge Announcement

@deckforge_official · Post #358 · 10.12.2025 г., 12:01

⏸ The Official DeckForge Gameplay Trailer is Here! Our official gameplay trailer is finally here — your first true glimpse into the chaos, beauty & raw power of the DeckForge multiverse. 🔵Where explosive combos ignite, 🔵where Bosses rise from the Void, 🔵where Jokers are forged, broken, reborn & where Genesis begins. This trailer marks the start of a new chapter — one that you will shape. 👀 Watch the trailer. Feel the energy. Step into the Forge. Share your thoughts in the comments — we’re reading every single one. Stay Forged! 🔥 #DeckForge#MobileGaming#GameplayReveal Join the DeckForge Community: 🌐YouTube𝕏Twitter🎮Discord 👉Chat👉Announcements👉DeckForge

DeckForge Announcement

@deckforge_official · Post #351 · 08.12.2025 г., 16:51

▶️DeckForge x RuStore Conference Recap RuStore Mobile Conference has officially wrapped — and it was incredible. 🔵Over 1,000+ industry leaders, studios, publishers and creators gathered under one roof 🔵Our showcase zone was packed all day — tons of gameplay sessions, powerful feedback & new connections with top experts across CIS & Asia 🔵RuStore shared big insights on the future of their platform and expansion into Asian markets — and we’re thrilled to grow alongside them as one of the most anticipated cross-platform titles of 2026 🔵This year, RuStore held its first-ever awards for the best mobile apps and games. Dozens of titles were recognized as the industry’s top performers But we know one thing for sure: next year, DeckForge is taking its place on that stage! Now it’s time to get back to the forge — polishing the upcoming release, preparing holiday events & crafting something truly special for our players. Stay Forged 🔥 #DeckForge#RuStore#GameDev#MobileGaming Join the DeckForge Community: 🌐YouTube𝕏Twitter🎮Discord 👉Chat👉Announcements👉DeckForge

GAMEFEST.UZ

@gamefestuz · Post #270 · 02.04.2026 г., 09:11

🎮 KATTA YANGILIK: TapNation — Game Fest 2026 markazida! Tayyor turing, geymerlar! Dunyoning eng yirik mobil o‘yin nashriyotlaridan biri bo‘lgan TapNation rasman Game Fest 2026 festivalida ishtirok etishini e’lon qiladi! 🚀 Bu shunchaki tadbir emas, bu mobil o‘yinlar olamidagi inqilobiy tajriba bo‘ladi. Biz bilan birga o‘yin sanoatining kelajagiga sho‘ng‘ing! ————————— 🎮 BIG NEWS: TapNation Takes Center Stage at Game Fest 2026! Get ready, gamers! We are thrilled to officially announce that TapNation, one of the world’s leading mobile game publishers, will be lighting up Game Fest 2026! 🚀 This isn’t just an event; it’s an immersive journey into the future of mobile gaming. Join us as we push the boundaries of innovation and dive deep into the next generation of play #TapNation#GameFest2026#MobileGaming#GamingCommunity#Gamedev#UzbekistanGaming#NewGames2026

Bounty Hunters 💎

@trustedairdropsss · Post #655 · 01.03.2021 г., 06:12

Unlock unlimited fun & winning at Rummy24. Download the App Now👉https://rummy24.sng.link/Averc/fcz2/lcft . . . #Rummy24#RummyApp#PlayRummy#UnlimitedFun#PlayRummy#onlinerummy#cardsgame#mobilegames#mobilegaming#mobilegame#cardgames#onlinegame#play#skills#win