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

Резултати

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

Пребарај: #pricedrop

当前筛选 #pricedrop清除筛选
Crypto M - Crypto News

@CryptoM · Post #65255 · 12.04.2026 г., 10:55

🚀 Ethereum(ETH) Drops Below 2,200 USDT with a 1.88% Decrease in 24 Hours On Apr 12, 2026, 10:55 AM(UTC). According to Binance Market Data, Ethereum has dropped below 2,200 USDT and is now trading at 2,198.01001 USDT, with a narrowed 1.88% decrease in 24 hours. #Ethereum#ETH#Crypto#USDT#Binance#CryptoNews#PriceDrop#Cryptocurrency

Crypto M - Crypto News

@CryptoM · Post #65204 · 12.04.2026 г., 01:34

🚀 Bitcoin(BTC) Drops Below 73,000 USDT with a 0.20% Decrease in 24 Hours On Apr 12, 2026, 01:34 AM(UTC). According to Binance Market Data, Bitcoin has dropped below 73,000 USDT and is now trading at 72,763.46875 USDT, with a narrowed 0.20% decrease in 24 hours. #Bitcoin#BTC#USDT#Crypto#Cryptocurrency#Binance#MarketUpdate#PriceDrop#CryptoNews

Crypto M - Crypto News

@CryptoM · Post #65307 · 12.04.2026 г., 19:51

🚀 Ethereum(ETH) Drops Below 2,200 USDT with a 5.06% Decrease in 24 Hours On Apr 12, 2026, 19:50 PM(UTC). According to Binance Market Data, Ethereum has dropped below 2,200 USDT and is now trading at 2,199.120117 USDT, with a narrowed 5.06% decrease in 24 hours. #Ethereum#ETH#USDT#Cryptocurrency#CryptoNews#Binance#PriceDrop#MarketUpdate#CryptoTrading#Blockchain

Crypto M - Crypto News

@CryptoM · Post #65286 · 12.04.2026 г., 14:44

🚀 BNB Drops Below 590 USDT with a 2.51% Decrease in 24 Hours On Apr 12, 2026, 14:43 PM(UTC). According to Binance Market Data, BNB has dropped below 590 USDT and is now trading at 589.280029 USDT, with a narrowed 2.51% decrease in 24 hours. #BNB#USDT#Binance#Crypto#Cryptocurrency#PriceDrop#MarketUpdate#Decreasing

Crypto M - Crypto News

@CryptoM · Post #65397 · 13.04.2026 г., 05:02

🚀 XRP's Social Fear Sentiment Reaches High Levels Amid Price Decline Social fear sentiment surrounding XRP has reached its third-highest level in the past two years, according to NS3.AI. The cryptocurrency has experienced a 63% decline over the past nine months. Historically, such high levels of pessimism have increased the likelihood of a rebound. #XRP#Cryptocurrency#CryptoSentiment#MarketDecline#InvestorFear#PriceDrop

Crypto M - Crypto News

@CryptoM · Post #65032 · 10.04.2026 г., 14:48

🚀 Significant NOM Transfer to Centralized Exchange Amid Price Drop On April 10, a substantial transfer of NOM tokens was observed. According to BlockBeats On-chain Detection, an address group holding at least 59% of NOM's circulating supply moved 23% of the tokens, totaling 674 million NOM, to a centralized exchange within the past hour. This transfer coincided with a 25% decline in NOM's price today. The address group is likely responsible for driving a sixfold increase in NOM's value over the past two weeks, from $0.0017 to $0.0126. On April 1, they withdrew 1.72 billion NOM from a centralized exchange using seven wallets, representing 59% of NOM's total circulating supply of 2.9 billion tokens. #NOM#centralizedexchange#tokentransfer#priceDrop#cryptocurrency#blockchain#onchain#crypto#cryptomarket#pricefluctuation#cryptotransfer

Crypto M - Crypto News

@CryptoM · Post #64789 · 10.04.2026 г., 00:04

🚀 OneFootball Club Token Faces Decline in Market Valuation The probability of OneFootball Club's fully diluted valuation (FDV) exceeding $50 million on Polymarket has dropped to 14%, marking a 51% decrease over 24 hours. According to Odaily, this decline follows the announcement made yesterday afternoon on the X platform that OneFootball Club's token, OFC, has officially launched with a current market valuation of $45 million. #OneFootball#Token#MarketValuation#FDV#Polymarket#Crypto#OFC#Web3#Blockchain#CryptoMarket#PriceDrop#ValuationDecline

Venture Village Wall 🦄

@venturevillagewall · Post #3668 · 21.12.2024 г., 13:28

Aptos Price Drop After CEO Exit Aptos' price has fallen over 25% in the last week following the departure of CEO Mo Sheikh. The project will now be led by co-founder and CTO Avery Ching, who Sheikh believes will drive the company's next growth phase. Learn more about Aptos in our educational material and read further insights in this article. #Aptos#Blockchain#Crypto#CEO#PriceDrop#MarketUpdate#Leadership#Growth#Web3#TechDirector#Investment#Decentralization#Fintech#Cryptocurrency#TechNews#Innovation#Finance#Resources#Education#Insights#News

Venture Village Wall 🦄

@venturevillagewall · Post #4328 · 07.03.2025 г., 07:00

Trump Establishes Strategic Bitcoin Reserve Former President Trump has signed an order to create a strategic Bitcoin reserve in the U.S., based on approximately 200,000 BTC confiscated by the government. This reserve will serve as a savings asset, not intended for sale, acting as a digital Fort Knox. Meanwhile, analysts indicate that governments may follow the U.S. lead, reducing the likelihood of Bitcoin bans from regulators. Post-announcement, Bitcoin saw a price drop from $91,000 to $85,000 but has since recovered to $88,000. No altcoins are currently included in the reserve plans. Full details here: Reuters #Bitcoin#crypto#Trumpr#US#Blockchain#Finance#Regulation#Assets#DigitalCurrency#Investments#Savings#Market#Trading#Reserves#Government#FTX#Securities#FortKnox#Economy#PriceDrop#StrategicReserve