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

Резултати

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

Пребарај: #custody

当前筛选 #custody清除筛选
Venture Village Wall 🦄

@venturevillagewall · Post #4126 · 11.02.2025 г., 22:00

BitGo Considers IPO in 2025 Crypto custodian BitGo Inc. is exploring an IPO, potentially listing in H2 2025 amid positive regulatory climate. The company raised $100 million in 2023, increasing its valuation to $1.75 billion. This move aligns with growing institutional interest in crypto. Read more: Bloomberg #Crypto#IPO#BitGo#Blockchain#Investment#MSTR#Profit#Custody#Regulation#Market#Financial#Valuation#Institutional#Assets#Saylor#Trading#News#Tech#Finance#VC

Venture Village Wall 🦄

@venturevillagewall · Post #4078 · 05.02.2025 г., 22:00

Massive Crypto Transfers and Bitcoin News 🚨 A staggering 50 billion #HEX ($104 million) moved between unknown wallets. Read more on Whale Alert. ⏳ On another note, Utah will become the first U.S. state to create a Bitcoin Reserve, investing up to 5% of state funds in $BTC and altcoins, potentially setting a precedent nationwide. 📊 Bitcoin's annual volatility is at an all-time low, with superior risk-adjusted returns compared to major asset classes as reported by ARK Invest. Meanwhile, the total Stablecoin supply on Base has surpassed $4B (source). Plus, banks are lobbying for crypto custody opportunities, while over 5,100 #BTC ($497 million) was transferred from #Kraken to an unknown wallet. Ark Invest also confirms Bitcoin's trajectory toward its 2030 price targets. 🌐 #HEX#Bitcoin#BTC#Kraken#Stablecoin#Crypto#Finance#Investments#ARKInvest#DeFi#Utah#Volatility#PriceTargets#WhaleAlert#Custody#CryptoAssets#Onchain#Investing#MarketTrends#Ethereum

Venture Village Wall 🦄

@venturevillagewall · Post #4335 · 08.03.2025 г., 01:00

Coinbase Expands Listings Amid Positive Crypto News Coinbase adds Aethir (ATH) and Syrup (SYRUP) to listing roadmap. Aethir is a decentralized yield aggregator; Syrup enhances institutional digital asset lending. In related news, Gemini, the crypto firm of the Winklevoss twins, confidentially files for IPO with Goldman Sachs, Citigroup support; public offering may happen this year. Additionally, the top US banking regulator rescinds digital asset restrictions, allowing banks to engage in crypto custody and stablecoin activities. Trump's administration pursuing strategies to increase U.S. Bitcoin reserves. #Coinbase#Aethir#Syrup#Gemini#IPO#Winklevoss#Crypto#Bitcoin#Finance#Regulation#US#Banking#Custody#Stablecoins#DigitalAssets#DeFi#VC#Trump#CryptoNews#MarketUpdates

Venture Village Wall 🦄

@venturevillagewall · Post #4153 · 14.02.2025 г., 19:00

Citi Eyes Crypto Custody Expansion Citi is considering the addition of crypto custody services, indicating a growing interest in the digital asset space. Meanwhile, 60,045,505 #XRP, valued at 163,660,947 USD, was recently transferred between unknown wallets, according to Whale Alert. Read more: BBG #Citi#Crypto#XRP#Custody#WhaleAlert#Finance#DigitalAssets#Banking#Investment#Assets#Blockchain#Wallets#Market#News#Updates#FinanceNews#FinanceTech#WealthManagement#CustodyServices#DigitalCurrency

Venture Village Wall 🦄

@venturevillagewall · Post #4187 · 19.02.2025 г., 04:00

Crypto-Friendly Lutnick Confirmed as Commerce Secretary The US Senate has confirmed Howard Lutnick as Secretary of Commerce, known for his pro-crypto stance. In related news, State Street and Citi, two major banks, are both entering the cryptocurrency custody business, with State Street planning to launch services next year. State Street manages $46.6 trillion while Citi holds $25 trillion in custody assets. Read more here and further details on custody here. #Crypto#Commerce#Banking#Custody#HowardLutnick#StateStreet#Citi#Finance#Assets#Investment#DigitalAssets#BitCoin#CustodianServices#Blockchain#Senate#Regulation#USPolitics#Cryptocurrency#Innovation#CryptoNews

Venture Village Wall 🦄

@venturevillagewall · Post #3835 · 10.01.2025 г., 04:00

Russia to Sell Seized Bitcoin Assets The Russian Ministry of Finance plans to sell seized Bitcoin assets from the Infraud hacking case, starting with a batch valued at approximately $10 million. Marat Tambiev, a corrupt official, previously obtained 1,032.1 BTC from the hacker group. Read more here. #Bitcoin#Russia#Infraud#Crypto#DigitalAssets#Banking#Finance#Regulation#MiCA#Custody#StandardChartered#EU#Hacking#Seizure#MaratTambiev#CryptoNews#BTC#Blockchain#FinanceNews#News

Venture Village Wall 🦄

@venturevillagewall · Post #4192 · 19.02.2025 г., 16:00

Hong Kong Targets Global Virtual Asset Hub Hong Kong unveils new roadmap to become a global virtual asset center, focusing on staking services, attracting liquidity, and exploring derivatives trading. Further endeavors include OTC and custody licensing. For details, visit Wu Blockchain News. #HongKong#VirtualAssets#Crypto#DeFi#Liquidity#Licensing#Staking#Derivatives#OTC#Custody#Regulation#Finance#Investment#Blockchain#Web3#MarketTrends#TechUpdates#Innovation#GlobalMarkets#FutureOfFinance