[Qt-interest] Spacing between the content on QTableView and its scrollbars
Jens Bache-Wiig
jbache at trolltech.com
Fri Dec 12 19:21:04 CET 2008
Marian Ciobanu wrote:
> I've been reading the documentation, looking through the source code,
> doing screen captures and running test programs for several hours now,
> but I can't find an answer to this question:
>
> In some styles (e.g. Motif or CDE) there is a spacing of several pixels
> between a QTableView and its scrollbar(s), while in others (e.g.
> Plastique) there is no such spacing. More precisely, this is 4 pixels
> for Motif and 2 for CDE, as can be seen from the screen captures and
> from the test programs.
QStyle::SH_ScrollView_FrameOnlyAroundContents is what you are looking
for. It basically states that the scrollbar should be outside the
content as it is in motif. In Qt pre 4.5, I believe the actual size used
to be 2 * (the scrollarea framewidth). In 4.5 we have also added
QStyle::PM_ScrollView_ScrollBarSpacing to allow styles such as QGtkStyle
to control this distance precisely.
--
Jens Bache-Wiig - jbache at trolltech.com
Nokia - Qt Software - Sandakerveien 116, P.O. Box 4332 Nydalen, 0402
Oslo, Norway
More information about the Qt-interest-old
mailing list