[][src]Function qt_widgets::q_draw_shade_panel_q_painter4_int_q_palette_bool

pub unsafe fn q_draw_shade_panel_q_painter4_int_q_palette_bool(
    p: impl CastInto<Ptr<QPainter>>,
    x: c_int,
    y: c_int,
    w: c_int,
    h: c_int,
    pal: impl CastInto<Ref<QPalette>>,
    sunken: bool
)

Draws the shaded panel beginning at (x, y) with the given width and height using the provided painter and the given lineWidth.

Calls C++ function: void qDrawShadePanel(QPainter* p, int x, int y, int w, int h, const QPalette& pal, bool sunken = …).

C++ documentation:

Draws the shaded panel beginning at (x, y) with the given width and height using the provided 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.