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

TGINSIGHT SIMILAR POSTS

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

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

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

Hashtags

Резултати

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

Пребарај: #uluwatu

当前筛选 #uluwatu清除筛选
Bali News

@balinews · Post #457 · 08.07.2025 г., 09:55

🏚Demolition of illegal buildings has begun in Bingin 📰 Protests have been unsuccessful. Mass demolition of illegal buildings has begun on Bingin Beach: more than forty warungs, boutique hotels, and surf schools are to be dismantled. 📍 The authorities call it the restoration of state land, while local entrepreneurs fear losing their only source of income. Among the establishments that are to disappear from the coastal map are the varungs Didi's, Kelly's, and Ombak. #beaches#Uluwatu#realestate@BaliNews

Bali News

@balinews · Post #132 · 02.08.2024 г., 10:01

🏄‍♀️Rip Curl Cup kicked off in Uluwatu 📍 One of the most prestigious competitions in world surfing has started at the Balinese spot Padang Padang. 🌊 On which of the days in August the awards will be drawn, no one knows. Organizers, judges and athletes will be waiting for the best waves, the so-called "pipes", to show all that they know how to do for a month. 🏆 This year the format of the Rip Curl Cup has been updated. The organizers decided to follow the ideas of gender equality and agreed to hold separate competitions for women at the same time with men. The last time this happened in Bali was 21 years ago. President of Rip Curl Indonesia James Hendy explained that the decision to create a women's division this year was made after the success of Canadian surfer Erin Brooks, who competed with men at the last Rip Curl Cup last year and reached the final, in which at first even led. 🖥 You can watch the broadcast of the championship itself, as well as find out the date of the championship at the link. 🎉 The main party of Rip Curl Cup-2024 will start at 17:00 on August 30 and will continue until midnight. @BaliNews #events#beaches#beaches#sports#Uluwatu

Bali News

@balinews · Post #120 · 19.07.2024 г., 11:02

🛣Details about the construction of a district road in Bukit District authorities are set to solve the road issue in Uluwatu by laying a new district road. Construction of the first section from Siligita village to Sawangan in Nusa Dua district has already started. The original idea was to extend the toll road, which now runs from the airport to Nusa Dua, all the way to Uluwatu. Right now, traffic on the main road jl. Uluwatu is difficult because it is both a hub of commerce and the main thoroughfare of the area, used by everyone from locals to construction vehicles and tour buses. The land acquisition budget for 2024 will be $16 million, with the next one already promised to increase to $19 million. According to an insider in Bali's land office, all consideration of new housing development in the green zone on Bukit is now halted just in time for the land acquisition for the new roads. @BaliNews #roads#roads#authorities#Bukit#Uluwatu#NusaDua