@sgmrt · Post #1504 · 20.09.2022 г., 23:04
[NSL]: Train services has resumed. Free regular bus services between #Yishun and #ToaPayoh has ceased. - SMRT
TGINSIGHT SIMILAR POSTS
Изворен канал @pythonotes · Post #110 · 3 јул.
Есть у QLabel есть одна особенность. Её минимальный размер определяется текстом, который в неё записан. Это приводит к тому что длинный текст принудительно увеличивает ширину интерфейса. В большинстве случаев это выглядит плохо. Как с этим бороться? 🔸 Обрезать текст заранее, задав лимит по длине строки. В этом случае мы теряем часть визуальной информации. Не всегда угадаешь нужный размер. В разных OS шрифт используется разный. 🔸 Делать перенос строки. Тогда мы получим изменение размера в другую сторону, что тоже поломает интерфейс. 🔸 Переопределить paintEvent() и сделать кастомный рендеринг текста. Можно, но слишком сложно для такой задачи. Проще всего обрезать текст под текущий размер виджета используя класс QFontMetrics. Он имеет готовый метод elidedText(), который просто вызываем по событию resizeEvent. Я также добавил установку ToolTip чтобы всегда можно было увидеть полный текст при наведении курсора. 🌎 Код здесь #qt#source
Пребарај: #toapayoh
@sgmrt · Post #1504 · 20.09.2022 г., 23:04
[NSL]: Train services has resumed. Free regular bus services between #Yishun and #ToaPayoh has ceased. - SMRT
@sgmrt · Post #1503 · 20.09.2022 г., 22:49
[NSL] UPDATE: Due to a track fault, pls add 15mins train travel time btwn #Yishun and #ToaPayoh. Free regular bus svcs from #Yishun to #ToaPayoh. - SMRT
@sgmrt · Post #1501 · 20.09.2022 г., 22:23
[NSL]: Due to a track fault, pls add 15mins train travel time btwn #Yishun and #ToaPayoh. Free regular bus svcs from #Yishun to #ToaPayoh. Our station staff will assist. - SMRT
@sgmrt · Post #1500 · 20.09.2022 г., 22:07
[NSL]: Due to a track fault, pls add 15mins train travel time btwn #Yishun and #ToaPayoh. - SMRT
@sgmrt · Post #2386 · 08.07.2025 г., 01:54
[NSL] UPDATE: Track fault cleared, train services are progressively being restored. Please add 10mins train travel time from #ToaPayoh to #Somerset. - SMRT
@sgmrt · Post #2318 · 16.04.2025 г., 04:29
[NSL]: Due to a track fault, please add 15mins travel time from #ToaPayoh to #Bishan towards #JurongEast. Free regular buses are available between #ToaPayoh and #Bishan. - SMRT
Hashtags
@sgmrt · Post #2317 · 16.04.2025 г., 04:14
[NSL]: Due to a track fault, please add 15mins train travel time from #ToaPayoh to #Bishan towards #JurongEast. Free regular buses are available between #ToaPayoh and #Bishan. Please look out for fellow commuters with special needs and lend a helping hand. We are sorry for - SMRT
Hashtags
@sgmrt · Post #2316 · 16.04.2025 г., 04:05
[NSL]: Due to a track fault, please add 15mins train travel time from #ToaPayoh to #Bishan towards #JurongEast. Free regular bus is available between #ToaPayoh and #Bishan. (Refer to Diagram 1) https://bit.ly/3YBCjlJ - SMRT
Hashtags
@sgmrt · Post #2314 · 16.04.2025 г., 03:29
[NSL]: Due to a track fault, pls add 15mins train travel time from #ToaPayoh to #Bishan towards #JurongEast. Free regular bus is available between #ToaPayoh and #Bishan. - SMRT
Hashtags
@sgmrt · Post #2226 · 10.01.2025 г., 10:44
[NSL] CLEARED: Fault cleared, train service between #MarinaSouthPier and #Bishan has resumed. Free regular bus svc btwn #MarinaSouthPier and #ToaPayoh has ceased. - SMRT
Hashtags
@sgmrt · Post #2225 · 10.01.2025 г., 10:39
[NSL] UPDATE: Train service between #MarinaSouthPier and #Bishan has resumed. Free regular bus svc btwn #MarinaSouthPier and #ToaPayoh has ceased. Trains are running normally. - SMRT
Hashtags
@sgmrt · Post #2224 · 10.01.2025 г., 10:34
[NSL] UPDATE: Train service between #MarinaSouthPier and #Bishan has resumed. Free regular bus svc btwn #MarinaSouthPier and #ToaPayoh is still available. - SMRT
Hashtags