[][src]Function qt_widgets::q_draw_plain_rect_5a

pub unsafe fn q_draw_plain_rect_5a(
    p: impl CastInto<Ptr<QPainter>>,
    r: impl CastInto<Ref<QRect>>,
    arg3: impl CastInto<Ref<QColor>>,
    line_width: c_int,
    fill: impl CastInto<Ptr<QBrush>>
)

This is an overloaded function.

Calls C++ function: void qDrawPlainRect(QPainter* p, const QRect& r, const QColor& arg3, int lineWidth = …, const QBrush* fill = …).

C++ documentation:

This is an overloaded function.

Draws the plain rectangle specified by rect using the given painter, lineColor and lineWidth. The rectangle's interior is filled with the fill brush unless fill is 0.

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 plain rectangle:

QFrame frame: frame.setFrameStyle(QFrame::Box | QFrame::Plain);

See also qDrawShadeRect() and QStyle.