TGTGInsighttelegram intelligenceLIVE / telegram public index
← Python Заметки

TGINSIGHT SIMILAR POSTS

Најди сличен содржај

Изворен канал @pythonotes · Post #110 · 3 јул.

Есть у QLabel есть одна особенность. Её минимальный размер определяется текстом, который в неё записан. Это приводит к тому что длинный текст принудительно увеличивает ширину интерфейса. В большинстве случаев это выглядит плохо. Как с этим бороться? 🔸 Обрезать текст заранее, задав лимит по длине строки. В этом случае мы теряем часть визуальной информации. Не всегда угадаешь нужный размер. В разных OS шрифт используется разный. 🔸 Делать перенос строки. Тогда мы получим изменение размера в другую сторону, что тоже поломает интерфейс. 🔸 Переопределить paintEvent() и сделать кастомный рендеринг текста. Можно, но слишком сложно для такой задачи. Проще всего обрезать текст под текущий размер виджета используя класс QFontMetrics. Он имеет готовый метод elidedText(), который просто вызываем по событию resizeEvent. Я также добавил установку ToolTip чтобы всегда можно было увидеть полный текст при наведении курсора. 🌎 Код здесь #qt#source

Hashtags

Резултати

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

Пребарај: #centralafricanrepublic

当前筛选 #centralafricanrepublic清除筛选
RTDocumentary

@rtdocumentary · Post #139 · 25.07.2021 г., 10:00

Testimony of an ex-child soldier #video#CentralAfricanRepublic In the Central African Republic, thousands of children have joined violent militias – either by force, or by choice. Since 2013, the country has been locked in civil war, with several disparate groups fighting each other. Some kids have joined the Christian Anti-balaka group and wear elaborate amulets to protect them against guns. Others fight for Seleka Muslim rebels with AK-47s. As part of a UNICEF-led effort to free child soldiers over the years, thousands of underage soldiers have left the groups. However, children traumatised by war have to go through a rehabilitation process before going home. This child who we filmed for Children of the Front shared his memories. Follow: https://t.me/rtdocumentary

Venture Village Wall 🦄

@venturevillagewall · Post #4111 · 10.02.2025 г., 07:00

Arweave AO Live, CAR Meme Token Launch Arweave’s computing platform AO is now active on its mainnet, enhancing decentralized applications. More info: The Block. In crypto news, the President of the Central African Republic, Faustin-Archange Touadéra, announced the launch of a meme token named CAR, reaching a market cap close to $900 million shortly after release. However, the token's legitimacy is questioned due to reported hacks and potential issues with its announcement video being AI-generated. Further details: Forklog. Analysts forecast significant declines for new token issuances, expecting drops of over 80% post-listing. Read more: Wu Blockchain News. #Arweave#DeFi#Crypto#Token#Market#Launch#CentralAfricanRepublic#MemeToken#Touadera#AI#Analyst#Predict#Listing#Invest#Blockchain#Ethereum#ETH