ChatCrawlersearch across public Telegram Open the app
Q

Qt for Python (PySide/Shiboken)

5 March 2024
2024-03-05×
5 March 2024
A
Is there any way to enforce a label to re-wrap the text after the former's resized?
T
Anton YablokovCorrect. I can't figure out why my MWE works fine, but the larger code does not. Never mind, then. Thanks for the help!
What action should trigger a re-wrap? Resizing the window/widget? Setting the label text programmatically? What's the observed result? (Text pushing the window larger than it should? Text cuts off? Unexpected scrollbars appear?) If you use UI files, check that the textWrap property is set in them. Also check that you re-compiled the UI file to a Python module and not run outdated code.
A
ThomasWhat action should trigger a re-wrap? Resizing the window/widget? Setting the label text programmatically? What's the observed result? (Text pushing the window larger than it should? Text cuts off? Unexpected scrollbars appear?) If you use UI files, check that the textWrap property is set in them.
Setting the width of the label should re-wrap the text. And in the MWE, it does. However, the larger code produces the text that's never wrapped at all. The text (HTML) has several lines, which are displayed correctly. The right edges of the lines are clipped. Again, in the MWE, it's fine. And no, it's not an UI file. It's a dirty hack, and it might be too dirty.
T
Anton YablokovSetting the width of the label should re-wrap the text. And in the MWE, it does. However, the larger code produces the text that's never wrapped at all. The text (HTML) has several lines, which are displayed correctly. The right edges of the lines are clipped. Again, in the MWE, it's fine. And no, i
What's happening after you resize the window using the mouse in that clipped state? Does it snap larger or stay that? If it stays, I assume some widget in the object tree doesn't have a layout. What happens if you set a verbatim copy of the HTML text into the label in your MWE?
A
ThomasWhat's happening after you resize the window using the mouse in that clipped state? Does it snap larger or stay that? If it stays, I assume some widget in the object tree doesn't have a layout. What happens if you set a verbatim copy of the HTML text into the label in your MWE?
Ссылка
click to show
Thomas, I do appreciate your help. I really do. However, as I can't reproduce the issue in an MWE, I'd like not to discuss it further. The full code is a bit too complex to break it for the tests you propose. Apparently, the code does something under the hood. It would take much time and would not result in anything useful. Anyway, that's the MWE, which _does_ reproduce the wrapping issue: https://pastebin.com/gXnnxM57
Calendar: March 2024
MoTuWeThFrSaSu1213543576789101035112412132141151161781819201321272223242526274283293012318
Archive by month
Open in Telegram Каталог площадок Искать в ChatCrawler

A snapshot of an open public feed from the search index ChatCrawler — “Google for public Telegram”; refreshed as the venue is crawled. Times are UTC.

Public content only, official Telegram API. About · FAQ · What we do not do · Remove a page · Catalog