///
/// This property describes the widget's palette. The palette is used by the
/// widget's style when rendering standard components, and is available as a
/// means to ensure that custom widgets can maintain consistency with the
/// native platform's look and feel. It's common that different platforms, or
/// different styles, have different palettes.
///
/// When you assign a new palette to a widget, the color roles from this
/// palette are combined with the widget's default palette to form the
/// widget's final palette. The palette entry for the widget's background role
/// is used to fill the widget's background (see QWidget::autoFillBackground),
/// and the foreground role initializes QPainter's pen.
///
/// The default depends on the system environment. QApplication maintains a
/// system/theme palette which serves as a default for all widgets. There may
/// also be special palette defaults for certain types of widgets (e.g., on
/// Windows Vista, all classes that derive from QMenuBar have a special
/// default palette). You can also define default palettes for widgets
/// yourself by passing a custom palette and the name of a widget to
/// QApplication::setPalette(). Finally, the style always has the option of
/// polishing the palette as it's assigned (see QStyle::polish()).
///
/// QWidget propagates explicit palette roles from parent to child. If you
/// assign a brush or color to a specific role on a palette and assign that
/// palette to a widget, that role will propagate to all the widget's
/// children, overriding any system defaults for that role. Note that palettes
/// by default don't propagate to windows (see isWindow()) unless the
/// Qt::WA_WindowPropagation attribute is enabled.
///
/// QWidget's palette propagation is similar to its font propagation.
///
/// The current style, which is used to render the content of all standard Qt
/// widgets, is free to choose colors and brushes from the widget palette, or
/// in some cases, to ignore the palette (partially, or completely). In
/// particular, certain styles like GTK style, Mac style, and Windows Vista
/// style, depend on third party APIs to render the content of widgets,
/// and these styles typically do not follow the palette. Because of this,
/// assigning roles to a widget's palette is not guaranteed to change the
/// appearance of the widget. Instead, you may choose to apply a [styleSheet.](styleSheet.)
/// You can refer to our Knowledge Base article
/// [here](http://qt.nokia.com/developer/knowledgebase/22)
/// for more
/// information.
///
/// **Warning**: Do not use this function in conjunction with [Qt Style Sheets](Qt%20Style%20Sheets)
///
/// When using style sheets, the palette of a widget can be customized using
/// the , , ,
/// and .
///
/// **See also:** [`Application::palette`]
/// [`Widget::font`]
This property describes the widget's palette. The palette is used by the
widget's style when rendering standard components, and is available as a
means to ensure that custom widgets can maintain consistency with the
native platform's look and feel. It's common that different platforms, or
different styles, have different palettes.

When you assign a new palette to a widget, the color roles from this
palette are combined with the widget's default palette to form the
widget's final palette. The palette entry for the widget's background role
is used to fill the widget's background ,
and the foreground role initializes QPainter's pen.

The default depends on the system environment. QApplication maintains a
system/theme palette which serves as a default for all widgets. There may
also be special palette defaults for certain types of widgets . You can also define default palettes for widgets
yourself by passing a custom palette and the name of a widget to
QApplication::setPalette(). Finally, the style always has the option of
polishing the palette as it's assigned ).

QWidget propagates explicit palette roles from parent to child. If you
assign a brush or color to a specific role on a palette and assign that
palette to a widget, that role will propagate to all the widget's
children, overriding any system defaults for that role. Note that palettes
by default don't propagate to windows ) unless the
Qt::WA_WindowPropagation attribute is enabled.

QWidget's palette propagation is similar to its font propagation.

The current style, which is used to render the content of all standard Qt
widgets, is free to choose colors and brushes from the widget palette, or
in some cases, to ignore the palette (partially, or completely). In
particular, certain styles like GTK style, Mac style, and Windows Vista
style, depend on third party APIs to render the content of widgets,
and these styles typically do not follow the palette. Because of this,
assigning roles to a widget's palette is not guaranteed to change the
appearance of the widget. Instead, you may choose to apply a [styleSheet.](styleSheet.)
You can refer to our Knowledge Base article
[here]
for more
information.

Warning**: Do not use this function in conjunction with [Qt Style Sheets](Qt%20Style%20Sheets)

When using style sheets, the palette of a widget can be customized using
the , , ,
and .


This property describes the widget ' s palette . The palette is used by the widget ' s style when rendering standard components and is available as a means to ensure that custom widgets can maintain consistency with the native platform ' s look and feel . It ' s common that different platforms or different styles have different palettes . When you assign a new palette to a widget the color roles from this palette are combined with the widget ' s default palette to form the widget ' s final palette . The palette entry for the widget ' s background role is used to fill the widget ' s background and the foreground role initializes QPainter ' s pen . The default depends on the system environment . QApplication maintains a system / theme palette which serves as a default for all widgets . There may also be special palette defaults for certain types of widgets . You can also define default palettes for widgets yourself by passing a custom palette and the name of a widget to QApplication :: setPalette () . Finally the style always has the option of polishing the palette as it ' s assigned ) . QWidget propagates explicit palette roles from parent to child . If you assign a brush or color to a specific role on a palette and assign that palette to a widget that role will propagate to all the widget ' s children overriding any system defaults for that role . Note that palettes by default don ' t propagate to windows ) unless the Qt :: WA_WindowPropagation attribute is enabled . QWidget ' s palette propagation is similar to its font propagation . The current style which is used to render the content of all standard Qt widgets is free to choose colors and brushes from the widget palette or in some cases to ignore the palette ( partially or completely ) . In particular certain styles like GTK style Mac style and Windows Vista style depend on third party APIs to render the content of widgets and these styles typically do not follow the palette . Because of this assigning roles to a widget ' s palette is not guaranteed to change the appearance of the widget . Instead you may choose to apply a [ styleSheet . ] ( styleSheet . ) You can refer to our Knowledge Base article [ here ] for more information . Warning ** : Do not use this function in conjunction with [ Qt Style Sheets ] ( Qt%20Style%20Sheets ) When using style sheets the palette of a widget can be customized using the and .
pub fn palette(&self) -> Option<Palette> {
        let (obj_data, funcs) = self.get_widget_obj_funcs();
        unsafe {
            let ret_val = ((*funcs).palette)(obj_data);
            if ret_val.qt_data == ::std::ptr::null() {
                return None;
            }
            let t = ret_val;
            let ret_val;
            if t.host_data != ::std::ptr::null() {
                ret_val = Palette::new_from_rc(t);
            } else {
                ret_val = Palette::new_from_owned(t);
            }
            Some(ret_val)
        }
    }
pub fn palette ( & self ) -> Option < Palette > { let ( obj_data , funcs ) = self . get_widget_obj_funcs ( ) ; unsafe { let ret_val = ( ( * funcs ) . palette ) ( obj_data ) ; if ret_val . qt_data == :: std :: ptr :: null ( ) { return None ; } let t = ret_val ; let ret_val ; if t . host_data != :: std :: ptr :: null ( ) { ret_val = Palette :: new_from_rc ( t ) ; } else { ret_val = Palette :: new_from_owned ( t ) ; } Some ( ret_val ) } }
This property describes the widget's palette.
This property describes the widget ' s palette .
&self