Есть у QLabel есть одна особенность. Её минимальный размер определяется текстом, который в неё записан. Это приводит к тому что длинный текст принудительно увеличивает ширину интерфейса.
В большинстве случаев это выглядит плохо.
Как с этим бороться?
🔸 Обрезать текст заранее, задав лимит по длине строки. В этом случае мы теряем часть визуальной информации. Не всегда угадаешь нужный размер. В разных OS шрифт используется разный.
🔸 Делать перенос строки. Тогда мы получим изменение размера в другую сторону, что тоже поломает интерфейс.
🔸 Переопределить paintEvent() и сделать кастомный рендеринг текста. Можно, но слишком сложно для такой задачи.
Проще всего обрезать текст под текущий размер виджета используя класс QFontMetrics.
Он имеет готовый метод elidedText(), который просто вызываем по событию resizeEvent.
Я также добавил установку ToolTip чтобы всегда можно было увидеть полный текст при наведении курсора.
🌎 Код здесь
#qt#source
Circle Acquires Hashnote for USYC Integration
Circle has acquired Hashnote, the issuer of the USYC tokenized money market fund, to integrate it with Circle's USDC. This aims to facilitate conversion between on-chain cash and yield-generating collateral. Additionally, Circle is partnering with Cumberland for liquidity and settlement support.
More details: CoinDesk
#Circle#Hashnote#USYC#USDC#Crypto#VC
Circle Expands USDC Ecosystem
🚀 Circle announces key developments:
- Acquired RWA platform Hashnote.
- Partnered with DRW to promote USDC and Ondo Dollar (USDY).
- USDC and USYC launching on Canton blockchain.
💵 50M USDC minted (approx. $50.03M).
Bitcoin ETFs now hold over 1.1M BTC (~5.7% supply).
Details here | More on Bitcoin ETFs | Canton news
#USDC#Circle#Blockchain#Crypto#Finance#USYC#Bitcoin#ETFs#Investments#Hashnote#DRW#DigitalAssets#Canton#Markets#CryptoTrends#Tokenization#WhaleAlert#Funding#Sustainability#DeFi#Innovation
Circle Acquires Hashnote; $5.6M for Wingbits
🔍 Institutional investment management platform Hashnote acquired by Circle.
💰 Wingbits, a token-incentivized flight tracking network, raises $5.6M in a strategic funding round led by Borderless Capital and Bullish, with participation from various investors.
🔄 Significant crypto movement detected: 2,410 #BTC (worth $253M) transferred to Coinbase Institutional.
⚡ Mantle announces a financial blockchain center with a treasury of $4.3B, planning expansion of mETH and FBTC Protocols in 2025.
🌐 Mistral AI aims for IPO and opens Singapore office as part of regional expansion.
🏛️ Major U.S. Bitcoin miner MARA advocates for Bitcoin reserves in 50 states with state-level bills under consideration.
🚀 Stargate Project initiated by tech giants for AI infrastructure in the U.S., with $500 billion investment planned by 2029.
🔗Read more about Mantle's blockchain center.
#Hashnote#Circle#Wingbits#Crypto#BTC#Mantle#mETH#FBTC#MistralAI#IPO#MARA#Bitcoin#StargateProject#AI#VC