Changeset 467 for trunk/src/gui


Ignore:
Timestamp:
Jan 22, 2010, 6:21:43 PM (16 years ago)
Author:
Dmitry A. Kuminov
Message:

gui: QWidget: When setting the parent, take the parent's resolve masks to make sure attributes imposed by the user on the parent won't be overriden by the natural palette for this widget if it differs from QApplication::palette() [vendor bug].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gui/kernel/qwidget.cpp

    r447 r467  
    92529252    if (!testAttribute(Qt::WA_StyleSheet)
    92539253        && (!parent || !parent->testAttribute(Qt::WA_StyleSheet))) {
     9254        if (parent) {
     9255            // take the parent's resolve masks to make sure attributes imposed
     9256            // by the user on the parent won't be overriden by the natural
     9257            // palette for this widget if it differs from QApplication::palette()
     9258            QWidgetPrivate *pd = parent->d_func();
     9259            d->inheritedFontResolveMask =
     9260                pd->data.fnt.resolve() | pd->inheritedFontResolveMask;
     9261            d->inheritedPaletteResolveMask =
     9262                pd->data.pal.resolve() | pd->inheritedPaletteResolveMask;
     9263        }
    92549264        d->resolveFont();
    92559265        d->resolvePalette();
Note: See TracChangeset for help on using the changeset viewer.