Yes, it seems that word wrapping without complex strategies is not entirely consistent across platforms (I'm testing on Windows 11 - Sigil 2.6 - and WSL Ubuntu - Sigil 2.0).
I rewrote the plugin to use QTableView and QAbstractTableModel, partly to learn about Qt's Model/View architecture, partly because I don't think the elision of the text would be a problem here.
I get a weird glitch, only on Windows/PySide6, with both my WrappingCheckBox and QTableView, when word wrap is set to True: there is always a specific width that causes the text to wrap on two lines, but without the cell or QLabel widget expanding to accommodate it all, like in the attached image. If I then resize the window's width by a couple of pixel, the problem disappears one way or another.
This doesn't happen on Ubuntu (where I use PyQt5).
Quote:
Originally Posted by KevinH
It took most of today to work out the little nits.
|
I am pleased to have given you the opportunity to have so much fun exploring the deepest meanders of Qt.
Jokes aside, if your experiment is shareable without you wasting more time, I could try to reimplement it for my other plugin, otherwise I'll probably just use the WrappingCheckBox approach.