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

TGINSIGHT SIMILAR POSTS

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

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

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

Hashtags

Резултати

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

Пребарај: #gandhi

当前筛选 #gandhi清除筛选
TALKS

@talks · Post #19 · 29.07.2016 г., 17:05

◼ I've been fascinated by life and extraordinary achievements of Great Mahatma Gandhi. This man has freed India from British oppression using non-violent protests, which is a miracle in my opinion. Unfortunately it's very hard to find a good quality footage of Gandhi's speech, however there's an amazing Oscar winning biographical movie made in 1982. And i found a really nice piece for YOU to enjoy. #Gandhihttps://youtu.be/e3tjIiWIkAQ

Hashtags

Addis Standard

@addisstandardeng · Post #21655 · 09.03.2026 г., 13:46

#IndiGo flight from Delhi to Manchester makes sudden mid-air U-turn near #Ethiopia A #Delhi–#Manchester flight operated by IndiGo made an unexpected mid-air U-turn near the Ethiopia border on Monday, with the reason for the diversion still unclear. Flight 6E33, operated on a Boeing 787-9 Dreamliner, had departed from Indira #Gandhi International Airport in 3New_Delhi on a scheduled service to Manchester in the #United_Kingdom. The aircraft was en route over East Africa when it abruptly changed course and returned toward Indian airspace. Flight tracking data shows that the plane had approached the Ethiopian border before performing the sudden turnaround. There has been no indication of. a technical fault or operational issue, and no official explanation has been provided by the airline. Passengers on board were reportedly unaware of any immediate danger, and the flight later ..... https://web.facebook.com/AddisstandardEng/posts/pfbid0DLWYcW6KDf5PwDbLUSGtFnaFaqFRT4wKEQFRdFoMFMQxHJc2HrXHWDYoZz4FVugvl