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
qtoolbarseparator.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
5
6#include <qstyle.h>
7#include <qstyleoption.h>
8#include <qtoolbar.h>
9#include <qpainter.h>
10
12
19
23
25{
26 orient = orientation;
27 update();
28}
29
32
34{
38 return QSize(extent, extent);
39}
40
48
50
51#include "moc_qtoolbarseparator_p.cpp"
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
\inmodule QtCore
Definition qsize.h:25
The QStyleOption class stores the parameters used by QStyle functions.
@ State_Horizontal
Definition qstyle.h:74
@ PM_ToolBarSeparatorExtent
Definition qstyle.h:487
@ PE_IndicatorToolBarSeparator
Definition qstyle.h:142
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
Returns the value of the given pixel metric.
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...
QToolBarSeparator(QToolBar *parent)
void setOrientation(Qt::Orientation orientation)
Qt::Orientation orientation() const
void initStyleOption(QStyleOption *option) const
void paintEvent(QPaintEvent *) override
This event handler can be reimplemented in a subclass to receive paint events passed in event.
QSize sizeHint() const override
The QToolBar class provides a movable panel that contains a set of controls.
Definition qtoolbar.h:23
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
void setSizePolicy(QSizePolicy)
void update()
Updates the widget unless updates are disabled or the widget is hidden.
QStyle * style() const
Definition qwidget.cpp:2600
QWidget * parentWidget() const
Returns the parent of this widget, or \nullptr if it does not have any parent widget.
Definition qwidget.h:904
QStyleOptionButton opt
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
@ Horizontal
Definition qnamespace.h:99
GLfloat GLfloat p
[1]
GLuint GLenum option