[][src]Function qt_widgets::q_draw_shade_panel_q_painter_q_rect_q_palette_bool_int_q_brush

pub unsafe fn q_draw_shade_panel_q_painter_q_rect_q_palette_bool_int_q_brush(
    p: impl CastInto<Ptr<QPainter>>,
    r: impl CastInto<Ref<QRect>>,
    pal: impl CastInto<Ref<QPalette>>,
    sunken: bool,
    line_width: c_int,
    fill: impl CastInto<Ptr<QBrush>>
)

This is an overloaded function.

Calls C++ function: void qDrawShadePanel(QPainter* p, const QRect& r, const QPalette& pal, bool sunken = …, int lineWidth = …, const QBrush* fill = …).

C++ documentation:

This is an overloaded function.

Draws the shaded panel at the rectangle specified by rect using the given painter and the given lineWidth.

The given palette specifies the shading colors (light, dark and middle colors). The panel's interior is filled with the fill brush unless fill is 0.

The panel appears sunken if sunken is true, otherwise raised.

Warning: This function does not look at QWidget::style() or QApplication::style(). Use the drawing functions in QStyle to make widgets that follow the current GUI style.

Alternatively you can use a QFrame widget and apply the QFrame::setFrameStyle() function to display a shaded panel:

QFrame frame: frame.setFrameStyle( QFrame::Panel | QFrame::Sunken);

See also qDrawWinPanel(), qDrawShadeLine(), qDrawShadeRect(), and QStyle.