[][src]Function qt_widgets::q_draw_plain_rect_8a

pub unsafe fn q_draw_plain_rect_8a(
    p: impl CastInto<MutPtr<QPainter>>,
    x: c_int,
    y: c_int,
    w: c_int,
    h: c_int,
    arg6: impl CastInto<Ref<QColor>>,
    line_width: c_int,
    fill: impl CastInto<Ptr<QBrush>>
)

Draws the plain rectangle beginning at (x, y) with the given width and height, using the specified painter, lineColor and lineWidth. The rectangle's interior is filled with the fill brush unless fill is 0.

Calls C++ function: void qDrawPlainRect(QPainter* p, int x, int y, int w, int h, const QColor& arg6, int lineWidth = …, const QBrush* fill = …).

C++ documentation:

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