View Single Post
Old 08-10-2025, 04:21 PM   #576
wrCisco
Connoisseur
wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.wrCisco ought to be getting tired of karma fortunes by now.
 
Posts: 50
Karma: 605108
Join Date: Apr 2016
Device: none
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 View Post
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2025-08-10 182050.png
Views:	34
Size:	20.6 KB
ID:	217417  
wrCisco is offline   Reply With Quote