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

TGINSIGHT SIMILAR POSTS

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

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

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

Hashtags

Резултати

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

Пребарај: #rocky

当前筛选 #rocky清除筛选
Pensive|

@PensivePost · Post #5704 · 03.05.2022 г., 18:13

#iam#Rocky#yourreview#review Love the way you are Hey buddy, yes you, one who is reading this, you may be alone, not having many friends unlike others, not having enough money to live up to your dreams, may be to even fulfil your small and cutest wishes, you might be tied up all day with your course books, stressful office work, those computers and the hectic tasks, you might be feeling like running away from all your problems and just forget about all your worries, those stressful tasks and from toxic people and enjoy the beauty of the wonderful life. Buddy, you are not alone, me, you, all the top CEO’S, the world politicians, world class celebrities, sportsmen and many real life heroes were been in the same stressful situations, Just stay calm, just feel the beauty of nature, love yourself, love the way you are, the way you are living your life. Have some inner peace, don’t be very harsh on yourselves, just believe in your dreams ,focus on your goals, your passion and nothing else. Don’t give a f* about all these f* things, the girl who rejected you, the friend who betrayed you, the relative who keeps judging you, the society which is putting you shame all the time. Just Focus on your dreams, which is going to bring a grand new reality to new. Remember, no matter where you are and what you are, how worse the situation is, always have that smile on your face, which is going to make all the difference. Bye Bye. (Rocky)

Trump's Ear

@trumpsear_tg · Post #2424 · 29.04.2026 г., 14:00

Greta Thunberg's boyfriend. His name is Rocky. They are said to have met in a psychiatric hospital, where Greta did not stay long after her first attempt to visit the Palestinians in Gaza. 🏥🌍 #greta#thunberg#boyfriend#rocky 👂More on Trump's Ear ⚠️

Видеотека 📼

@videotekashow · Post #13839 · 06.07.2025 г., 07:51

«Если окинуть взглядом свою жизнь, готов спорить, о 80% своих поступков вы пожалеете. Но жизнь — это и есть ошибки». Сегодня исполнилось 79 лет Сильвестру Сталлоне. #ВИДЕОТЕКА #SylvesterStallone #Rocky #FirstBlood #Cobra #TangoAndCash #Cliffhanger #DemolitionMan #TheSpecialist #Copland #TheExpendables2 #TulsaKing