PDA

View Full Version : How to exploit all the space on QTableWidget cells



mcgmail
1st May 2013, 13:52
When we put some text on QTableWidget cells some blank pixels are put by QT at left and right of it

In fact, when the user resizes the QTableWidget column it happens that (I describe what happens when the text is horizontally centered):

1) if the text is a single character, it is moved while a few blank pixels are retined at its left an right. Eventually, the one-character text disappears beyond the cell's border (even though the space available would still be sufficient for displaying it)
2) it the text is two or more characters, if it cannot be entirely displayed (along with a few blank pixels) it is first displayed as ellypsis "...", then disappears.

I want to exploit all the space available on my cells: therefore I want to reduce (or even set to zero) the number of blank pixels at left and right side of my text, and forbid the substitution of text with ellypsis.

Does anyone know how to do this?

Thanks a lot.

wysota
1st May 2013, 18:02
Implement a custom delegate.

mcgmail
1st May 2013, 21:41
It looks like a bit difficult for my current skills. I will study documentation on delegates and try.
Thanks, anyway.