///
/// This property describes the widget's requested font. The font 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, define different fonts for an application.
///
/// When you assign a new font to a widget, the properties from this font are
/// combined with the widget's default font to form the widget's final
/// font. You can call fontInfo() to get a copy of the widget's final
/// font. The final font is also used to initialize QPainter's font.
///
/// The default depends on the system environment. QApplication maintains a
/// system/theme font which serves as a default for all widgets. There may
/// also be special font defaults for certain types of widgets. You can also
/// define default fonts for widgets yourself by passing a custom font and the
/// name of a widget to QApplication::setFont(). Finally, the font is matched
/// against Qt's font database to find the best match.
///
/// QWidget propagates explicit font properties from parent to child. If you
/// change a specific property on a font and assign that font to a widget,
/// that property will propagate to all the widget's children, overriding any
/// system defaults for that property. Note that fonts by default don't
/// propagate to windows (see isWindow()) unless the Qt::WA_WindowPropagation
/// attribute is enabled.
///
/// QWidget's font propagation is similar to its palette propagation.
///
/// The current style, which is used to render the content of all standard Qt
/// widgets, is free to choose to use the widget font, or in some cases, to
/// ignore it (partially, or completely). In particular, certain styles like
/// GTK style, Mac style, and Windows Vista style, apply special
/// modifications to the widget font to match the platform's native look and
/// feel. Because of this, assigning properties to a widget's font is not
/// guaranteed to change the appearance of the widget. Instead, you may choose
/// to apply a [styleSheet.](styleSheet.)
///
/// **Note**: If [Qt Style Sheets](Qt%20Style%20Sheets)
/// are used on the same widget as setFont(),
/// style sheets will take precedence if the settings conflict.
///
/// **See also:** [`font_info()`]
/// [`font_metrics()`]
///
/// Returns the font metrics for the widget's current font.
/// Equivalent to `QFontMetrics(widget->font()).`
///
/// **See also:** [`font()`]
/// [`font_info()`]
/// [`set_font()`]
///
/// Returns the font info for the widget's current font.
/// Equivalent to `QFontInfo(widget->font()).`
///
/// **See also:** [`font()`]
/// [`font_metrics()`]
/// [`set_font()`]
This property describes the widget's requested font. The font 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, define different fonts for an application.

When you assign a new font to a widget, the properties from this font are
combined with the widget's default font to form the widget's final
font. You can call fontInfo() to get a copy of the widget's final
font. The final font is also used to initialize QPainter's font.

The default depends on the system environment. QApplication maintains a
system/theme font which serves as a default for all widgets. There may
also be special font defaults for certain types of widgets. You can also
define default fonts for widgets yourself by passing a custom font and the
name of a widget to QApplication::setFont(). Finally, the font is matched
against Qt's font database to find the best match.

QWidget propagates explicit font properties from parent to child. If you
change a specific property on a font and assign that font to a widget,
that property will propagate to all the widget's children, overriding any
system defaults for that property. Note that fonts by default don't
propagate to windows ) unless the Qt::WA_WindowPropagation
attribute is enabled.

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

The current style, which is used to render the content of all standard Qt
widgets, is free to choose to use the widget font, or in some cases, to
ignore it (partially, or completely). In particular, certain styles like
GTK style, Mac style, and Windows Vista style, apply special
modifications to the widget font to match the platform's native look and
feel. Because of this, assigning properties to a widget's font is not
guaranteed to change the appearance of the widget. Instead, you may choose
to apply a [styleSheet.](styleSheet.)

Note**: If [Qt Style Sheets](Qt%20Style%20Sheets)
are used on the same widget as setFont(),
style sheets will take precedence if the settings conflict.



Returns the font metrics for the widget's current font.



Returns the font info for the widget's current font.


This property describes the widget ' s requested font . The font 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 define different fonts for an application . When you assign a new font to a widget the properties from this font are combined with the widget ' s default font to form the widget ' s final font . You can call fontInfo () to get a copy of the widget ' s final font . The final font is also used to initialize QPainter ' s font . The default depends on the system environment . QApplication maintains a system / theme font which serves as a default for all widgets . There may also be special font defaults for certain types of widgets . You can also define default fonts for widgets yourself by passing a custom font and the name of a widget to QApplication :: setFont () . Finally the font is matched against Qt ' s font database to find the best match . QWidget propagates explicit font properties from parent to child . If you change a specific property on a font and assign that font to a widget that property will propagate to all the widget ' s children overriding any system defaults for that property . Note that fonts by default don ' t propagate to windows ) unless the Qt :: WA_WindowPropagation attribute is enabled . QWidget ' s font propagation is similar to its palette propagation . The current style which is used to render the content of all standard Qt widgets is free to choose to use the widget font or in some cases to ignore it ( partially or completely ) . In particular certain styles like GTK style Mac style and Windows Vista style apply special modifications to the widget font to match the platform ' s native look and feel . Because of this assigning properties to a widget ' s font is not guaranteed to change the appearance of the widget . Instead you may choose to apply a [ styleSheet . ] ( styleSheet . ) Note ** : If [ Qt Style Sheets ] ( Qt%20Style%20Sheets ) are used on the same widget as setFont () style sheets will take precedence if the settings conflict . Returns the font metrics for the widget ' s current font . Returns the font info for the widget ' s current font .
pub fn font(&self) -> Option<Font> {
        let (obj_data, funcs) = self.get_widget_obj_funcs();
        unsafe {
            let ret_val = ((*funcs).font)(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 = Font::new_from_rc(t);
            } else {
                ret_val = Font::new_from_owned(t);
            }
            Some(ret_val)
        }
    }
pub fn font ( & self ) -> Option < Font > { let ( obj_data , funcs ) = self . get_widget_obj_funcs ( ) ; unsafe { let ret_val = ( ( * funcs ) . font ) ( 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 = Font :: new_from_rc ( t ) ; } else { ret_val = Font :: new_from_owned ( t ) ; } Some ( ret_val ) } }
This property describes the widget's requested font.
This property describes the widget ' s requested font .
&self