[Interest] QTabBar drawBase property- what does it do?
christoph at maxiom.de
Wed Jul 25 00:59:12 CEST 2012
On Tuesday 24 July 2012 21:34:14 John Weeks wrote:
> I am in the process of porting code that draws images of controls.
> Due to history and architecture, I'm not using QWidgets as the
> basis for these controls, they are drawn using OS primitives. Now
> I am drawing them with QStyle.
> There are references amonst the Tab Bar stuff to a "base". The
> QTabBar widget has a property "drawBase" so I created a test case:
> a dialog layout with two QTabBars one with drawBase set and the
> other without. I've looked at Windows, Plastique, CleanLooks,
> Macintosh and Motif styles and can't see any difference. So...
> What does drawBase do? What are all those references (especially
> for QStyle::pixelMetric) to things related to TabBarBase?
> -John Weeks
A QTabWidget usually has a frame around its contents (let's forget
about documentMode right now). The tab bar at the top "breaks" this
frame for the active tab, in other words, the QTabBar has to render
above the frame drawn by QTabWidget. The amount of pixels the two
widgets share the frame is called the "overlap".
The "base" is historically the line drawn for a QTabBar, that is
actually a visual part of the QTabWidget. Depending on the style, the
base might include other graphics at the background. For example,
using the Skulpture style, the base graphics is a recessed looking
background. See http://kdepepo.files.wordpress.com/2009/05/kde4-style-
KDE Quality Team
More information about the Interest