Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
doc_src_qt4-styles.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
3
6 qstyleoption_cast<const QStyleOptionFocusRect *>(option);
8 ...
9}
11
12
15{
16 QPainter painter(this);
17 ...
18
20 option.init(this);
21 option.backgroundColor = palette().color(QPalette::Window);
22
24 this);
25}
void paintEvent(QPaintEvent *event) override
[0]
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:486
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
Definition qpalette.h:67
\variable QStyleOption::palette
@ PE_FrameFocusRect
Definition qstyle.h:106
virtual void drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w=nullptr) const =0
Draws the given primitive element with the provided painter using the style options specified by opti...
QPalette palette
the widget's palette
Definition qwidget.h:132
QStyle * style() const
Definition qwidget.cpp:2600
const QStyleOptionFocusRect * focusRectOption
[0]
struct _cl_event * event
GLuint GLenum option
QPainter painter(this)
[7]