[Qt-interest] Alignment of data in a QTableView
Robert Hairgrove
evorgriahr at hispeed.ch
Sun Feb 6 14:17:12 CET 2011
There seems to be a problem with text alignment in the default delegate
rendering of text in a QTableView.
Here is a screenshot attached which shows that the last column is
top-aligned, even though I have code in the data() function of my model
class that returns "Qt::AlignLeft + Qt::AlignVCenter" for role ==
Qt::TextAlignmentRole. Depending on the font, it is sometimes also
clipped at the top. I am using a monospaced font because this is a
text-import wizard, and if the user chooses a file with fixed-width
text, it should display with a monospaced font.
Does this happen because the last column happens to be numeric data
(although it is actually text)?
Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot.png
Type: image/png
Size: 19813 bytes
Desc: not available
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110206/d86a146f/attachment.png
More information about the Qt-interest-old
mailing list