24 leftFrameWidth(0), rightFrameWidth(0),
25 topFrameWidth(0), bottomFrameWidth(0)
207 option->lineWidth =
d->lineWidth;
208 option->midLineWidth =
d->midLineWidth;
213 option->lineWidth =
d->frameWidth;
241 return d->frameStyle;
319 d->frameStyle = (short)
style;
321 d->updateFrameWidth();
339 if (
short(
w) ==
d->lineWidth)
341 d->lineWidth = short(
w);
342 d->updateFrameWidth();
363 if (
short(
w) ==
d->midLineWidth)
365 d->midLineWidth = short(
w);
366 d->updateFrameWidth();
372 return d->midLineWidth;
383 q->initStyleOption(&
opt);
402 QRect fr =
q->frameRect();
422 return d->frameWidth;
444 fr.
adjust(-
d->leftFrameWidth, -
d->topFrameWidth,
d->rightFrameWidth,
d->bottomFrameWidth);
452 cr.
adjust(
d->leftFrameWidth,
d->topFrameWidth, -
d->rightFrameWidth, -
d->bottomFrameWidth);
506 d->updateFrameWidth();
514 d_func()->updateFrameWidth();
518 d_func()->updateFrameWidth();
524#include "moc_qframe.cpp"
Type type() const
Returns the event type.
void updateStyledFrameWidths()
The QFrame class is the base class of widgets that can have a frame.
~QFrame()
Destroys the frame.
Shadow
This enum type defines the types of shadow that are used to give a 3D effect to frames.
QSize sizeHint() const override
\reimp
Shadow frameShadow
the frame shadow value from the frame style
QRect frameRect
the frame's rectangle
int midLineWidth
the width of the mid-line
int frameWidth
the width of the frame that is drawn.
bool event(QEvent *e) override
\reimp
void drawFrame(QPainter *)
void setFrameShape(Shape)
void setFrameStyle(int)
Sets the frame style to style.
virtual void initStyleOption(QStyleOptionFrame *option) const
int frameStyle() const
Returns the frame style.
void paintEvent(QPaintEvent *) override
\reimp
QFrame(QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags())
Constructs a frame widget with frame style \l NoFrame and a 1-pixel frame width.
Shape
This enum type defines the shapes of frame available.
int lineWidth
the line width
void changeEvent(QEvent *) override
\reimp
void setFrameShadow(Shadow)
void setFrameRect(const QRect &)
void setMidLineWidth(int)
Shape frameShape
the frame shape value from the frame style
The QPaintEvent class contains event parameters for paint events.
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
constexpr void adjust(int x1, int y1, int x2, int y2) noexcept
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
\variable QStyleOptionFocusRect::backgroundColor
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
virtual void drawControl(ControlElement element, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const =0
Draws the given element with the provided painter with the style options specified by option.
Combined button and popup list for selecting options.
@ WA_WState_OwnSizePolicy
constexpr const T & qMax(const T &a, const T &b)
GLfloat GLfloat GLfloat w
[0]
GLdouble GLdouble GLdouble GLdouble q
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent