[][src]Function qt_widgets::q_draw_shade_line_q_painter2_q_point_q_palette_bool

pub unsafe fn q_draw_shade_line_q_painter2_q_point_q_palette_bool(
    p: impl CastInto<Ptr<QPainter>>,
    p1: impl CastInto<Ref<QPoint>>,
    p2: impl CastInto<Ref<QPoint>>,
    pal: impl CastInto<Ref<QPalette>>,
    sunken: bool
)

This is an overloaded function.

Calls C++ function: void qDrawShadeLine(QPainter* p, const QPoint& p1, const QPoint& p2, const QPalette& pal, bool sunken = …).

C++ documentation:

This is an overloaded function.

Draws a horizontal or vertical shaded line between p1 and p2 using the given painter. Note that nothing is drawn if the line between the points would be neither horizontal nor vertical.

The provided palette specifies the shading colors (light, dark and middle colors). The given lineWidth specifies the line width for each of the lines; it is not the total line width. The given midLineWidth specifies the width of a middle line drawn in the QPalette::mid() color.

The line 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 line:

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

See also qDrawShadeRect(), qDrawShadePanel(), and QStyle.