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

Резултати

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

Пребарај: #nfts

当前筛选 #nfts清除筛选

Aqua Army is launching its first NFT project🌊 Mint 31/05/22 🚀 Release/reveal 06/06/22🧨 Aqua Army is an exclusive collection of 4,444 unique #NFTs that submerge you into a world of deep-sea adventure, purpose and collectibles living on the Ethereum network🐟 Every NFT is hand drawn with over 500+ traits over 8 sea characters living in different waters. 1 mint of 0.09ETH will clean up 300 plastic bottles from our oceans. A great portion of the proceeds will be donated to 5 non-profit based charities, who they've officially partnered with💰 Any Whitelist member will automatically be enrolled into a prize draw to WIN one of five AA NFTs 💵💵 Twitter 👇 https://twitter.com/AquaArmyNFT Join Minting👇 https://bit.ly/3NLQmgF Website & WL👇 https://aquaarmynft.com/?whitelist=true

Hashtags

​​🎙Aqua Army is launching its first NFT project🌊 Mint = 17th of May 🔥 Reveal/release = 23rd May🔥 Aqua Army is an exclusive collection of 4,444 unique #NFTs that submerge you into a world of deep-sea adventure, purpose and collectibles living on the Ethereum network🐟 Every NFT is hand drawn with over 500+ traits over 8 sea characters living in different waters. 1 mint of 0.09ETH will clean up 300 plastic bottles from our oceans. A great portion of the proceeds will be donated to 5 non-profit based charities, who they've officially partnered with💰 Any Whitelist member will automatically be enrolled into a prize draw to WIN one of five AA NFTs 💵💵 Twitter👇 https://twitter.com/AquaArmyNFT Discord👇 https://discord.com/invite/2ZnscjzSJZ Website & WL👇 https://aquaarmynft.com/?whitelist=true

Hashtags

🚀🚀The intelligent investors💯💯

@the_intelligent_investors · Post #42 · 15.12.2021 г., 15:18

Rad rabbits intensified! Sold over 1000 Rad rabbit #NFTs in less than 24 hours Last chance to get your rad rabbits with $AAA : http://radrabbbits.org 5600 #NFTs already sold Funds and projects are considering these #NFTs as bluechips Don’t miss out on these #NFTs

Hashtags

News and Tips

@NewsAndTipsNT · Post #3166 · 02.03.2025 г., 17:35

#Telegram now displays #NFTs in the profile background. You can click on them individually to view their details. Only pinned NFTs appear in the background, they appear exactly like your pinned order.

TONlines – News

@tonlines · Post #6920 · 23.04.2025 г., 17:20

TON Community: Guide to the Revival of NFTs #NFTs#Telegram The TON Community discusses the resurgence of NFTs in 2025, highlighting their integration into Telegram for easy use without wallets or gas fees. Animated stickers, digital gifts, and collectible items are now easily accessible. For more details, check their latest blog on TON NFTs. Source: link @tonlines

🏆 Premium, NFT, Tokens

@giiveaways · Post #3315 · 29.11.2024 г., 08:53

Boost Your Wins! 🏹 Complete tasks, grow your streak, and earn rewards like NFTs and TON tokens. 🎉Grand Lottery with 2,000 TON ends December 26th! 👉 Start now: https://t.me/tapps/app ➖➖➖➖➖➖➖➖➖➖➖ #NFTs#TON

Hashtags

Walken.io - Announcement

@walken_channel · Post #52 · 11.03.2022 г., 09:19

Next Monday we are releasing the beta version for the first 2000 testers on iOS. Are you excited? We definitely are! 🎉🎉🎉 P.s. you still can sign up for the whitelist on the website. $WLKN #gamefi#nfts

Hashtags

Walken.io - Announcement

@walken_channel · Post #39 · 21.02.2022 г., 14:29

Get ready for sprint🦶 A road race with a distance of 60 to 400 meters where most speed is the key. 3..2..1 - and the competition is kicked off. Just challenge a randomly selected rival and win the race😉 $WLKN #gamefi#nfts

Hashtags

123•••56
ПретходнаСтраница 1 од 6Следна