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
qscrollbar.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
4#include "qapplication.h"
5#include "qcursor.h"
6#include "qevent.h"
7#include "qpainter.h"
8#include "qscrollbar.h"
9#include "qstyle.h"
10#include "qstyleoption.h"
11#include "qstylepainter.h"
12#if QT_CONFIG(menu)
13#include "qmenu.h"
14#endif
15
16#include <QtCore/qelapsedtimer.h>
17#include <QtCore/qpointer.h>
18
19
20#if QT_CONFIG(accessibility)
21#include "qaccessible.h"
22#endif
23#include <limits.h>
24#include "qscrollbar_p.h"
25
27
162{
163 Q_Q(QScrollBar);
164 QRect lastHoverRect = hoverRect;
165 QStyle::SubControl lastHoverControl = hoverControl;
166 bool doesHover = q->testAttribute(Qt::WA_Hover);
167 if (lastHoverControl != newHoverControl(pos) && doesHover) {
168 q->update(lastHoverRect);
169 q->update(hoverRect);
170 return true;
171 }
172 return !doesHover;
173}
174
176{
177 Q_Q(QScrollBar);
178 QStyleOptionSlider opt;
179 q->initStyleOption(&opt);
180 opt.subControls = QStyle::SC_All;
181 hoverControl = q->style()->hitTestComplexControl(QStyle::CC_ScrollBar, &opt, pos, q);
183 hoverRect = QRect();
184 else
185 hoverRect = q->style()->subControlRect(QStyle::CC_ScrollBar, &opt, hoverControl, q);
186 return hoverControl;
187}
188
190{
191 Q_Q(QScrollBar);
192 if (transient != value) {
194 if (q->isVisible()) {
195 QStyleOptionSlider opt;
196 q->initStyleOption(&opt);
197 if (q->style()->styleHint(QStyle::SH_ScrollBar_Transient, &opt, q))
198 q->update();
199 } else if (!transient) {
200 q->show();
201 }
202 }
203}
204
206{
207 Q_Q(QScrollBar);
208 QStyleOptionSlider opt;
209 q->initStyleOption(&opt);
210 if (!flashed && q->style()->styleHint(QStyle::SH_ScrollBar_Transient, &opt, q)) {
211 flashed = true;
212 if (!q->isVisible())
213 q->show();
214 else
215 q->update();
216 }
217 if (!flashTimer)
218 flashTimer = q->startTimer(0);
219}
220
221void QScrollBarPrivate::activateControl(uint control, int threshold)
222{
224 switch (control) {
227 break;
230 break;
233 break;
236 break;
239 break;
242 break;
243 default:
244 break;
245 }
246
247 if (action) {
248 q_func()->setRepeatAction(action, threshold);
249 q_func()->triggerAction(action);
250 }
251}
252
254{
255 Q_Q(QScrollBar);
257 q->setRepeatAction(QAbstractSlider::SliderNoAction);
259
261 q->setSliderDown(false);
262
263 QStyleOptionSlider opt;
264 q->initStyleOption(&opt);
265 q->repaint(q->style()->subControlRect(QStyle::CC_ScrollBar, &opt, tmp, q));
266}
267
275void QScrollBar::initStyleOption(QStyleOptionSlider *option) const
276{
277 if (!option)
278 return;
279
280 Q_D(const QScrollBar);
281 option->initFrom(this);
282 option->subControls = QStyle::SC_None;
283 option->activeSubControls = QStyle::SC_None;
284 option->orientation = d->orientation;
285 option->minimum = d->minimum;
286 option->maximum = d->maximum;
287 option->sliderPosition = d->position;
288 option->sliderValue = d->value;
289 option->singleStep = d->singleStep;
290 option->pageStep = d->pageStep;
291 option->upsideDown = d->invertedAppearance;
292 if (d->orientation == Qt::Horizontal)
294 if ((d->flashed || !d->transient) && style()->styleHint(QStyle::SH_ScrollBar_Transient, option, this))
295 option->state |= QStyle::State_On;
296}
297
298
299#define HORIZONTAL (d_func()->orientation == Qt::Horizontal)
300#define VERTICAL !HORIZONTAL
301
314 : QScrollBar(Qt::Vertical, parent)
315{
316}
317
330 : QAbstractSlider(*new QScrollBarPrivate, parent)
331{
332 d_func()->orientation = orientation;
333 d_func()->init();
334}
335
336
337
344
346{
347 Q_Q(QScrollBar);
348 invertedControls = true;
352 opt.initFrom(q);
353 transient = q->style()->styleHint(QStyle::SH_ScrollBar_Transient, &opt, q);
354 flashed = false;
355 flashTimer = 0;
356 q->setFocusPolicy(Qt::NoFocus);
359 sp.transpose();
360 q->setSizePolicy(sp);
361 q->setAttribute(Qt::WA_WState_OwnSizePolicy, false);
362 q->setAttribute(Qt::WA_OpaquePaintEvent);
363}
364
365#ifndef QT_NO_CONTEXTMENU
368{
369 if (!style()->styleHint(QStyle::SH_ScrollBar_ContextMenu, nullptr, this)) {
371 return ;
372 }
373
374#if QT_CONFIG(menu)
375 bool horiz = HORIZONTAL;
376 QPointer<QMenu> menu = new QMenu(this);
377 QAction *actScrollHere = menu->addAction(tr("Scroll here"));
379 QAction *actScrollTop = menu->addAction(horiz ? tr("Left edge") : tr("Top"));
380 QAction *actScrollBottom = menu->addAction(horiz ? tr("Right edge") : tr("Bottom"));
382 QAction *actPageUp = menu->addAction(horiz ? tr("Page left") : tr("Page up"));
383 QAction *actPageDn = menu->addAction(horiz ? tr("Page right") : tr("Page down"));
385 QAction *actScrollUp = menu->addAction(horiz ? tr("Scroll left") : tr("Scroll up"));
386 QAction *actScrollDn = menu->addAction(horiz ? tr("Scroll right") : tr("Scroll down"));
387 QAction *actionSelected = menu->exec(event->globalPos());
388 delete menu;
389 if (actionSelected == nullptr)
390 /* do nothing */ ;
391 else if (actionSelected == actScrollHere)
392 setValue(d_func()->pixelPosToRangeValue(horiz ? event->pos().x() : event->pos().y()));
393 else if (actionSelected == actScrollTop)
395 else if (actionSelected == actScrollBottom)
397 else if (actionSelected == actPageUp)
399 else if (actionSelected == actPageDn)
401 else if (actionSelected == actScrollUp)
403 else if (actionSelected == actScrollDn)
405#endif // QT_CONFIG(menu)
406}
407#endif // QT_NO_CONTEXTMENU
408
409
412{
414 QStyleOptionSlider opt;
416
417 int scrollBarExtent = style()->pixelMetric(QStyle::PM_ScrollBarExtent, &opt, this);
418 int scrollBarSliderMin = style()->pixelMetric(QStyle::PM_ScrollBarSliderMin, &opt, this);
419 QSize size;
420 if (opt.orientation == Qt::Horizontal)
421 size = QSize(scrollBarExtent * 2 + scrollBarSliderMin, scrollBarExtent);
422 else
423 size = QSize(scrollBarExtent, scrollBarExtent * 2 + scrollBarSliderMin);
424
426 }
427
433
438{
439 Q_D(QScrollBar);
440 switch(event->type()) {
444 if (const QHoverEvent *he = static_cast<const QHoverEvent *>(event))
445 d_func()->updateHoverControl(he->position().toPoint());
446 break;
447 case QEvent::StyleChange: {
448 QStyleOptionSlider opt;
450 d_func()->setTransient(style()->styleHint(QStyle::SH_ScrollBar_Transient, &opt, this));
451 break;
452 }
453 case QEvent::Timer:
454 if (static_cast<QTimerEvent *>(event)->timerId() == d->flashTimer) {
455 QStyleOptionSlider opt;
457 if (d->flashed && style()->styleHint(QStyle::SH_ScrollBar_Transient, &opt, this)) {
458 d->flashed = false;
459 update();
460 }
461 killTimer(d->flashTimer);
462 d->flashTimer = 0;
463 }
464 break;
465 default:
466 break;
467 }
469}
470
474#if QT_CONFIG(wheelevent)
475void QScrollBar::wheelEvent(QWheelEvent *event)
476{
477 event->ignore();
478 bool horizontal = qAbs(event->angleDelta().x()) > qAbs(event->angleDelta().y());
479 // The vertical wheel can be used to scroll a horizontal scrollbar, but only if
480 // there is no simultaneous horizontal wheel movement. This is to avoid chaotic
481 // scrolling on touchpads.
482 if (!horizontal && event->angleDelta().x() != 0 && orientation() == Qt::Horizontal)
483 return;
484 // scrollbar is a special case - in vertical mode it reaches minimum
485 // value in the upper position, however QSlider's minimum value is on
486 // the bottom. So we need to invert the value, but since the scrollbar is
487 // inverted by default, we need to invert the delta value only for the
488 // horizontal orientation.
489 int delta = horizontal ? -event->angleDelta().x() : event->angleDelta().y();
490 Q_D(QScrollBar);
491 if (d->scrollByDelta(horizontal ? Qt::Horizontal : Qt::Vertical, event->modifiers(), delta))
492 event->accept();
493
494 if (event->phase() == Qt::ScrollBegin)
495 d->setTransient(false);
496 else if (event->phase() == Qt::ScrollEnd)
497 d->setTransient(true);
498}
499#endif
500
505{
506 Q_D(QScrollBar);
507 QStylePainter p(this);
508 QStyleOptionSlider opt;
510 opt.subControls = QStyle::SC_All;
511 if (d->pressedControl) {
512 opt.activeSubControls = (QStyle::SubControl)d->pressedControl;
513 if (!d->pointerOutsidePressedControl)
515 } else {
516 opt.activeSubControls = (QStyle::SubControl)d->hoverControl;
517 }
518 p.drawComplexControl(QStyle::CC_ScrollBar, opt);
519}
520
525{
526 Q_D(QScrollBar);
527
528 if (d->repeatActionTimer.isActive())
529 d->stopRepeatAction();
530
532 nullptr, this);
533 QStyleOptionSlider opt;
535 opt.keyboardModifiers = e->modifiers();
536
537 if (d->maximum == d->minimum // no range
538 || (e->buttons() & (~e->button())) // another button was clicked before
539 || !(e->button() == Qt::LeftButton || (midButtonAbsPos && e->button() == Qt::MiddleButton)))
540 return;
541
542 d->pressedControl = style()->hitTestComplexControl(QStyle::CC_ScrollBar, &opt, e->position().toPoint(), this);
543 d->pointerOutsidePressedControl = false;
544
547 QPoint click = e->position().toPoint();
548 QPoint pressValue = click - sr.center() + sr.topLeft();
549 d->pressValue = d->orientation == Qt::Horizontal ? d->pixelPosToRangeValue(pressValue.x()) :
550 d->pixelPosToRangeValue(pressValue.y());
551 if (d->pressedControl == QStyle::SC_ScrollBarSlider) {
552 d->clickOffset = HORIZONTAL ? (click.x()-sr.x()) : (click.y()-sr.y());
553 d->snapBackPosition = d->position;
554 }
555
556 if ((d->pressedControl == QStyle::SC_ScrollBarAddPage
557 || d->pressedControl == QStyle::SC_ScrollBarSubPage)
558 && ((midButtonAbsPos && e->button() == Qt::MiddleButton)
560 && e->button() == Qt::LeftButton))) {
561 int sliderLength = HORIZONTAL ? sr.width() : sr.height();
562 setSliderPosition(d->pixelPosToRangeValue((HORIZONTAL ? e->position().toPoint().x()
563 : e->position().toPoint().y()) - sliderLength / 2));
564 d->pressedControl = QStyle::SC_ScrollBarSlider;
565 d->clickOffset = sliderLength / 2;
566 }
567 const int initialDelay = 500; // default threshold
569 time.start();
570 d->activateControl(d->pressedControl, initialDelay);
571 repaint(style()->subControlRect(QStyle::CC_ScrollBar, &opt, d->pressedControl, this));
572 if (time.elapsed() >= initialDelay && d->repeatActionTimer.isActive()) {
573 // It took more than 500ms (the initial timer delay) to process
574 // the control activation and repaint(), we therefore need
575 // to restart the timer in case we have a pending mouse release event;
576 // otherwise we'll get a timer event right before the release event,
577 // causing the repeat action to be invoked twice on a single mouse click.
578 // 50ms is the default repeat time (see activateControl/setRepeatAction).
579 d->repeatActionTimer.start(50, this);
580 }
581 if (d->pressedControl == QStyle::SC_ScrollBarSlider)
582 setSliderDown(true);
583}
584
585
590{
591 Q_D(QScrollBar);
592 if (!d->pressedControl)
593 return;
594
595 if (e->buttons() & (~e->button())) // some other button is still pressed
596 return;
597
598 d->stopRepeatAction();
599}
600
601
606{
607 Q_D(QScrollBar);
608 if (!d->pressedControl)
609 return;
610
611 QStyleOptionSlider opt;
613 if (!(e->buttons() & Qt::LeftButton
614 || ((e->buttons() & Qt::MiddleButton)
616 return;
617
618 if (d->pressedControl == QStyle::SC_ScrollBarSlider) {
619 QPoint click = e->position().toPoint();
620 int newPosition = d->pixelPosToRangeValue((HORIZONTAL ? click.x() : click.y()) -d->clickOffset);
622 if (m >= 0) {
623 QRect r = rect();
624 r.adjust(-m, -m, m, m);
625 if (! r.contains(e->position().toPoint()))
626 newPosition = d->snapBackPosition;
627 }
628 setSliderPosition(newPosition);
629 } else if (!style()->styleHint(QStyle::SH_ScrollBar_ScrollWhenPointerLeavesControl, &opt, this)) {
630
631 if (style()->styleHint(QStyle::SH_ScrollBar_RollBetweenButtons, &opt, this)
634 if (newSc == d->pressedControl && !d->pointerOutsidePressedControl)
635 return; // nothing to do
637 d->pointerOutsidePressedControl = false;
638 QRect scRect = style()->subControlRect(QStyle::CC_ScrollBar, &opt, newSc, this);
639 scRect |= style()->subControlRect(QStyle::CC_ScrollBar, &opt, d->pressedControl, this);
640 d->pressedControl = newSc;
641 d->activateControl(d->pressedControl, 0);
642 update(scRect);
643 return;
644 }
645 }
646
647 // stop scrolling when the mouse pointer leaves a control
648 // similar to push buttons
649 QRect pr = style()->subControlRect(QStyle::CC_ScrollBar, &opt, d->pressedControl, this);
650 if (pr.contains(e->position().toPoint()) == d->pointerOutsidePressedControl) {
651 if ((d->pointerOutsidePressedControl = !d->pointerOutsidePressedControl)) {
652 d->pointerOutsidePressedControl = true;
654 repaint(pr);
655 } else {
656 d->activateControl(d->pressedControl);
657 }
658 }
659 }
660}
661
662
664{
665 Q_Q(const QScrollBar);
666 QStyleOptionSlider opt;
667 q->initStyleOption(&opt);
668 QRect gr = q->style()->subControlRect(QStyle::CC_ScrollBar, &opt,
670 QRect sr = q->style()->subControlRect(QStyle::CC_ScrollBar, &opt,
672 int sliderMin, sliderMax, sliderLength;
673
675 sliderLength = sr.width();
676 sliderMin = gr.x();
677 sliderMax = gr.right() - sliderLength + 1;
678 if (q->layoutDirection() == Qt::RightToLeft)
679 opt.upsideDown = !opt.upsideDown;
680 } else {
681 sliderLength = sr.height();
682 sliderMin = gr.y();
683 sliderMax = gr.bottom() - sliderLength + 1;
684 }
685
687 sliderMax - sliderMin, opt.upsideDown);
688}
689
693{
694 Q_D(QScrollBar);
695 if (d->pressedControl) {
696 d->pressedControl = QStyle::SC_None;
698 }
699}
700
704Q_WIDGETS_EXPORT QStyleOptionSlider qt_qscrollbarStyleOption(QScrollBar *scrollbar)
705{
706 QStyleOptionSlider opt;
707 scrollbar->initStyleOption(&opt);
708 return opt;
709}
710
712
713#include "moc_qscrollbar.cpp"
Qt::Orientation orientation
The QAbstractSlider class provides an integer value within a range.
void setRepeatAction(SliderAction action, int thresholdTime=500, int repeatTime=50)
Sets action action to be triggered repetitively in intervals of repeatTime, after an initial delay of...
virtual void sliderChange(SliderChange change)
Reimplement this virtual function to track slider changes such as \l SliderRangeChange,...
SliderAction
\value SliderNoAction \value SliderSingleStepAdd \value SliderSingleStepSub \value SliderPageStepAdd ...
Qt::Orientation orientation
the orientation of the slider
bool event(QEvent *e) override
\reimp
void setSliderPosition(int)
SliderChange
\value SliderRangeChange \value SliderOrientationChange \value SliderStepsChange \value SliderValueCh...
void triggerAction(SliderAction action)
Triggers a slider action.
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
The QContextMenuEvent class contains parameters that describe a context menu event.
Definition qevent.h:594
\inmodule QtCore
\inmodule QtCore
Definition qcoreevent.h:45
@ StyleChange
Definition qcoreevent.h:136
@ HoverLeave
Definition qcoreevent.h:176
@ HoverEnter
Definition qcoreevent.h:175
@ HoverMove
Definition qcoreevent.h:177
The QHideEvent class provides an event which is sent after a widget is hidden.
Definition qevent.h:586
\inmodule QtGui
Definition qevent.h:246
Qt::KeyboardModifiers modifiers() const
Returns the keyboard modifier flags that existed immediately before the event occurred.
Definition qevent.h:56
The QMenu class provides a menu widget for use in menu bars, context menus, and other popup menus.
Definition qmenu.h:26
QAction * exec()
Executes this menu synchronously.
Definition qmenu.cpp:2613
QAction * addSeparator()
This convenience function creates a new separator action, i.e.
Definition qmenu.cpp:1921
void addAction(QAction *action)
Appends the action action to this widget's list of actions.
Definition qwidget.cpp:3117
\inmodule QtGui
Definition qevent.h:196
void killTimer(int id)
Kills the timer with timer identifier, id.
Definition qobject.cpp:1912
The QPaintEvent class contains event parameters for paint events.
Definition qevent.h:486
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
Definition qpoint.h:404
\inmodule QtCore\reentrant
Definition qpoint.h:25
constexpr int x() const noexcept
Returns the x coordinate of this point.
Definition qpoint.h:130
constexpr int y() const noexcept
Returns the y coordinate of this point.
Definition qpoint.h:135
\inmodule QtCore\reentrant
Definition qrect.h:30
constexpr int width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:236
QStyle::SubControl newHoverControl(const QPoint &pos)
void activateControl(uint control, int threshold=500)
void setTransient(bool value)
QStyle::SubControl pressedControl
QStyle::SubControl hoverControl
bool pointerOutsidePressedControl
int pixelPosToRangeValue(int pos) const
bool updateHoverControl(const QPoint &pos)
The QScrollBar widget provides a vertical or horizontal scroll bar.
Definition qscrollbar.h:20
~QScrollBar()
Destroys the scroll bar.
QScrollBar(QWidget *parent=nullptr)
Constructs a vertical scroll bar.
void paintEvent(QPaintEvent *) override
\reimp
void contextMenuEvent(QContextMenuEvent *) override
\reimp
virtual void initStyleOption(QStyleOptionSlider *option) const
Initialize option with the values from this QScrollBar.
bool event(QEvent *event) override
\reimp
void mouseReleaseEvent(QMouseEvent *) override
\reimp
void hideEvent(QHideEvent *) override
\reimp
void mousePressEvent(QMouseEvent *) override
\reimp
void sliderChange(SliderChange change) override
\reimp
void mouseMoveEvent(QMouseEvent *) override
\reimp
QSize sizeHint() const override
\reimp
QPointF position() const
Returns the position of the point in this event, relative to the widget or item that received the eve...
Definition qevent.h:119
Qt::MouseButton button() const
Returns the button that caused the event.
Definition qevent.h:116
Qt::MouseButtons buttons() const
Returns the button state when the event was generated.
Definition qevent.h:117
The QSizePolicy class is a layout attribute describing horizontal and vertical resizing policy.
Definition qsizepolicy.h:18
\inmodule QtCore
Definition qsize.h:25
The QStyleOption class stores the parameters used by QStyle functions.
QStyle::State state
void initFrom(const QWidget *w)
The QStylePainter class is a convenience class for drawing QStyle elements inside a widget.
@ State_Sunken
Definition qstyle.h:69
@ State_Horizontal
Definition qstyle.h:74
@ State_On
Definition qstyle.h:72
@ CT_ScrollBar
Definition qstyle.h:560
virtual QRect subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget=nullptr) const =0
Returns the rectangle containing the specified subControl of the given complex control (with the styl...
virtual QSize sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &contentsSize, const QWidget *w=nullptr) const =0
Returns the size of the element described by the specified option and type, based on the provided con...
@ SH_ScrollBar_RollBetweenButtons
Definition qstyle.h:648
@ SH_ScrollBar_Transient
Definition qstyle.h:681
@ SH_ScrollBar_MiddleClickAbsolutePosition
Definition qstyle.h:587
@ SH_ScrollBar_LeftClickAbsolutePosition
Definition qstyle.h:624
@ SH_ScrollBar_ContextMenu
Definition qstyle.h:647
@ SH_ScrollBar_ScrollWhenPointerLeavesControl
Definition qstyle.h:588
virtual int styleHint(StyleHint stylehint, const QStyleOption *opt=nullptr, const QWidget *widget=nullptr, QStyleHintReturn *returnData=nullptr) const =0
Returns an integer representing the specified style hint for the given widget described by the provid...
virtual SubControl hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget=nullptr) const =0
Returns the sub control at the given position in the given complex control (with the style options sp...
@ PM_ScrollBarExtent
Definition qstyle.h:426
@ PM_MaximumDragDistance
Definition qstyle.h:424
@ PM_ScrollBarSliderMin
Definition qstyle.h:427
static int sliderValueFromPosition(int min, int max, int pos, int space, bool upsideDown=false)
Converts the given pixel position to a logical value.
Definition qstyle.cpp:2267
@ CC_ScrollBar
Definition qstyle.h:334
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option=nullptr, const QWidget *widget=nullptr) const =0
Returns the value of the given pixel metric.
SubControl
This enum describes the available sub controls.
Definition qstyle.h:347
@ SC_ScrollBarSubLine
Definition qstyle.h:351
@ SC_ScrollBarAddPage
Definition qstyle.h:352
@ SC_ScrollBarLast
Definition qstyle.h:355
@ SC_ScrollBarAddLine
Definition qstyle.h:350
@ SC_ScrollBarGroove
Definition qstyle.h:357
@ SC_ScrollBarFirst
Definition qstyle.h:354
@ SC_All
Definition qstyle.h:400
@ SC_ScrollBarSlider
Definition qstyle.h:356
@ SC_ScrollBarSubPage
Definition qstyle.h:353
@ SC_None
Definition qstyle.h:348
\inmodule QtCore
Definition qcoreevent.h:366
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
void repaint()
Repaints the widget directly by calling paintEvent() immediately, unless updates are disabled or the ...
QSize size
the size of the widget excluding any window frame
Definition qwidget.h:113
QRect rect
the internal geometry of the widget excluding any window frame
Definition qwidget.h:116
void ensurePolished() const
Ensures that the widget and its children have been polished by QStyle (i.e., have a proper font and p...
void update()
Updates the widget unless updates are disabled or the widget is hidden.
QStyle * style() const
Definition qwidget.cpp:2600
virtual void contextMenuEvent(QContextMenuEvent *event)
This event handler, for event event, can be reimplemented in a subclass to receive widget context men...
Definition qwidget.cpp:9875
EGLImageKHR int int EGLuint64KHR * modifiers
QStyleOptionButton opt
Combined button and popup list for selecting options.
Definition qcompare.h:63
@ LeftButton
Definition qnamespace.h:58
@ MiddleButton
Definition qnamespace.h:60
@ WA_Hover
Definition qnamespace.h:340
@ WA_WState_OwnSizePolicy
Definition qnamespace.h:334
@ WA_OpaquePaintEvent
Definition qnamespace.h:287
@ RightToLeft
@ NoFocus
Definition qnamespace.h:107
Orientation
Definition qnamespace.h:98
@ Horizontal
Definition qnamespace.h:99
@ Vertical
Definition qnamespace.h:100
@ ScrollBegin
@ ScrollEnd
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
constexpr T qAbs(const T &t)
Definition qnumeric.h:328
const GLfloat * m
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLboolean r
[2]
struct _cl_event * event
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
GLfloat GLfloat p
[1]
GLuint GLenum option
Q_WIDGETS_EXPORT QStyleOptionSlider qt_qscrollbarStyleOption(QScrollBar *scrollbar)
#define HORIZONTAL
#define sp
#define tr(X)
unsigned int uint
Definition qtypes.h:34
QMenu menu
[5]