On Tuesday 18 June 2002 11:40, Anthony Gibbs wrote:
> Morning all,

Hi

>             say a widget has a background pixmap, how does one tell its
> child widgets that they should use the same background image, but that
> they shouldn't use a zero origin, ie to use the correct part of the
> background image such that the image appears smooth across its background
> too?

Try 
QWidget::setPaletteBackgroundPixmap()
and
QWidget::setBackgroundOrigin(WindowOrigin) for all child widgets.
Do not use ParentOrigin, otherwise grand-childs will have wrong origin again.
I'm not sure whether you have to set WindowOrigin for the parent (which 
contains the pixmap), too - just try it.

If you don't want to set the origin manually for all widgets you can use such 
a hack:
 QObjectList* l = queryList("QWidget", 0, true, true);
 QObjectListIt it(*l);
 QWidget* w;
 while ((w = (QWidget*)it.current()) != 0) {
        w->setBackgroundOrigin(WindowOrigin);
        ++it;
 }
 delete l;
