Hi There,

Screen space is really a point on embedded devices so I am currently 
searching why the column description needs to much space.

The problem is that QHeaderView::sectionSizeHint() returns more than the 
effective used width of the text, so there is much unused space on the 
right side of the column after calling 
QTreeView::resizeColumnToContents(). Additionally the screen result 
looks a little bit frouzy.

To find out where this comes from I have a simple column description 
with "iiiii". This needs 9 pixels in width after rendering. Every "i" 
needs one pixel and one pixel for the space between them.
So I debugged into the Qt source 
(qt-embedded-wince-opensource-src-4.5.0-snapshot-20090109) and find out 
that qtextlayout.cpp/addNextCluster() adds 3 pixels for every "i" glyphs 
(glyphs.advances_x[glyphPosition]==192) which results in a 
QFontMetrics::boundingRect() width of 15pixel. Even if there is a "hard 
coded" unneeded space pixel after the last glyph, this value should not 
larger than 10.

Unfortunately I am no Qt internal font rendering expert so I don't think 
it makes much sense to continue searching for the root problem.

So is this a known problem?

My test platform is WM5 and the WM5 PPC Emulator.

Greetings,
Marco
_______________________________________________
Qtce-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qtce-preview-feedback

Reply via email to