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
qquickdrawer.cpp
Go to the documentation of this file.
1// Copyright (C) 2017 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 "qquickdrawer_p.h"
5#include "qquickdrawer_p_p.h"
8
9#include <QtGui/qstylehints.h>
10#include <QtGui/private/qguiapplication_p.h>
11#include <QtQml/qqmlinfo.h>
12#include <QtQuick/private/qquickwindow_p.h>
13#include <QtQuick/private/qquickanimation_p.h>
14#include <QtQuick/private/qquicktransition_p.h>
15#include <QtQuickTemplates2/private/qquickoverlay_p.h>
16
18
23
143{
144public:
146
147 void reposition() override;
148};
149
151{
152 qreal offset = positionAt(point) - position;
153
154 // don't jump when dragged open
155 if (offset > 0 && position > 0 && !contains(point))
156 offset = 0;
157
158 return offset;
159}
160
162{
163 Q_Q(const QQuickDrawer);
164 QQuickWindow *window = q->window();
165 if (!window)
166 return 0;
167
168 auto size = QSizeF(q->width(), q->height());
169
170 switch (effectiveEdge()) {
171 case Qt::TopEdge:
172 if (edge == Qt::LeftEdge || edge == Qt::RightEdge)
173 size.transpose();
174 return point.y() / size.height();
175 case Qt::LeftEdge:
176 if (edge == Qt::TopEdge || edge == Qt::BottomEdge)
177 size.transpose();
178 return point.x() / size.width();
179 case Qt::RightEdge:
180 if (edge == Qt::TopEdge || edge == Qt::BottomEdge)
181 size.transpose();
182 return (window->width() - point.x()) / size.width();
183 case Qt::BottomEdge:
184 if (edge == Qt::LeftEdge || edge == Qt::RightEdge)
185 size.transpose();
186 return (window->height() - point.y()) / size.height();
187 default:
188 return 0;
189 }
190}
191
199
201{
202 if (m_positioning)
203 return;
204
205 QQuickDrawer *drawer = static_cast<QQuickDrawer*>(popup());
206 QQuickWindow *window = drawer->window();
207 if (!window)
208 return;
209
210 const qreal position = drawer->position();
211 QQuickItem *popupItem = drawer->popupItem();
212 switch (drawer->edge()) {
213 case Qt::LeftEdge:
214 popupItem->setX((position - 1.0) * popupItem->width());
215 break;
216 case Qt::RightEdge:
217 popupItem->setX(window->width() - position * popupItem->width());
218 break;
219 case Qt::TopEdge:
220 popupItem->setY((position - 1.0) * popupItem->height());
221 break;
222 case Qt::BottomEdge:
223 popupItem->setY(window->height() - position * popupItem->height());
224 break;
225 }
226
228}
229
231{
232 // managed in setPosition()
233}
234
236{
237 // managed in setPosition()
238}
239
241{
242 if (!dimmer || !window)
243 return;
244
246
247 QRectF geometry(0, 0, overlay ? overlay->width() : 0, overlay ? overlay->height() : 0);
248
249 if (edge == Qt::LeftEdge || edge == Qt::RightEdge) {
250 geometry.setY(popupItem->y());
251 geometry.setHeight(popupItem->height());
252 } else {
253 geometry.setX(popupItem->x());
254 geometry.setWidth(popupItem->width());
255 }
256
257 dimmer->setPosition(geometry.topLeft());
258 dimmer->setSize(geometry.size());
259}
260
262{
263 Q_Q(const QQuickDrawer);
264 switch (effectiveEdge()) {
265 case Qt::LeftEdge:
266 return pos.x() <= q->dragMargin();
267 case Qt::RightEdge:
268 return pos.x() >= q->window()->width() - q->dragMargin();
269 case Qt::TopEdge:
270 return pos.y() <= q->dragMargin();
271 case Qt::BottomEdge:
272 return pos.y() >= q->window()->height() - q->dragMargin();
273 default:
274 Q_UNREACHABLE();
275 break;
276 }
277 return false;
278}
279
281{
284 return false;
285
286 switch (event->type()) {
288 if (QMouseEvent *mouseEvent = static_cast<QMouseEvent *>(event); isWithinDragMargin(mouseEvent->scenePosition())) {
289 // watch future events and grab the mouse once it has moved
290 // sufficiently fast or far (in grabMouse).
292 mouseEvent->addPassiveGrabber(mouseEvent->point(0), popupItem);
293 handleMouseEvent(window->contentItem(), mouseEvent);
294 return false;
295 }
296 break;
297
298#if QT_CONFIG(quicktemplates2_multitouch)
300 case QEvent::TouchUpdate: {
301 auto *touchEvent = static_cast<QTouchEvent *>(event);
302 for (const QTouchEvent::TouchPoint &point : touchEvent->points()) {
303 if (point.state() == QEventPoint::Pressed && isWithinDragMargin(point.scenePosition())) {
305 touchEvent->addPassiveGrabber(point, popupItem);
306 handleTouchEvent(window->contentItem(), touchEvent);
307 return false;
308 }
309 }
310 break;
311 }
312#endif
313
314 default:
315 break;
316 }
317
318 return false;
319}
320
321static inline bool keepGrab(QQuickItem *item)
322{
323 return item->keepMouseGrab() || item->keepTouchGrab();
324}
325
327{
328 Q_Q(QQuickDrawer);
330
332 return false;
333
334 const QPointF movePoint = event->scenePosition();
335
336 // Flickable uses a hard-coded threshold of 15 for flicking, and
337 // QStyleHints::startDragDistance for dragging. Drawer uses a bit
338 // larger threshold to avoid being too eager to steal touch (QTBUG-50045)
339 const int threshold = qMax(20, QGuiApplication::styleHints()->startDragDistance() + 5);
340 bool overThreshold = false;
341 Qt::Edge effEdge = effectiveEdge();
342 if (position > 0 || dragMargin > 0) {
343 const bool xOverThreshold = QQuickWindowPrivate::dragOverThreshold(movePoint.x() - pressPoint.x(), Qt::XAxis, event, threshold);
344 const bool yOverThreshold = QQuickWindowPrivate::dragOverThreshold(movePoint.y() - pressPoint.y(), Qt::YAxis, event, threshold);
345 if (effEdge == Qt::LeftEdge || effEdge == Qt::RightEdge)
346 overThreshold = xOverThreshold && !yOverThreshold;
347 else
348 overThreshold = yOverThreshold && !xOverThreshold;
349 }
350
351 // Don't be too eager to steal presses outside the drawer (QTBUG-53929)
352 if (overThreshold && qFuzzyCompare(position, qreal(1.0)) && !contains(movePoint)) {
353 if (effEdge == Qt::LeftEdge || effEdge == Qt::RightEdge)
354 overThreshold = qAbs(movePoint.x() - q->width()) < dragMargin;
355 else
356 overThreshold = qAbs(movePoint.y() - q->height()) < dragMargin;
357 }
358
359 if (overThreshold) {
362 reposition();
364 }
365
368 offset = offsetAt(movePoint);
369 }
370
371 return overThreshold;
372}
373
374#if QT_CONFIG(quicktemplates2_multitouch)
375bool QQuickDrawerPrivate::grabTouch(QQuickItem *item, QTouchEvent *event)
376{
377 Q_Q(QQuickDrawer);
378 bool handled = handleTouchEvent(item, event);
379
380 if (!window || !interactive || keepGrab(popupItem) || keepGrab(item) || !event->touchPointStates().testFlag(QEventPoint::Updated))
381 return handled;
382
383 bool overThreshold = false;
384 for (const QTouchEvent::TouchPoint &point : event->points()) {
385 if (!acceptTouch(point) || point.state() != QEventPoint::Updated)
386 continue;
387
388 const QPointF movePoint = point.scenePosition();
389
390 // Flickable uses a hard-coded threshold of 15 for flicking, and
391 // QStyleHints::startDragDistance for dragging. Drawer uses a bit
392 // larger threshold to avoid being too eager to steal touch (QTBUG-50045)
393 const int threshold = qMax(20, QGuiApplication::styleHints()->startDragDistance() + 5);
394 const Qt::Edge effEdge = effectiveEdge();
395 if (position > 0 || dragMargin > 0) {
396 const bool xOverThreshold = QQuickWindowPrivate::dragOverThreshold(movePoint.x() - pressPoint.x(), Qt::XAxis, &point, threshold);
397 const bool yOverThreshold = QQuickWindowPrivate::dragOverThreshold(movePoint.y() - pressPoint.y(), Qt::YAxis, &point, threshold);
398 if (effEdge == Qt::LeftEdge || effEdge == Qt::RightEdge)
399 overThreshold = xOverThreshold && !yOverThreshold;
400 else
401 overThreshold = yOverThreshold && !xOverThreshold;
402 }
403
404 // Don't be too eager to steal presses outside the drawer (QTBUG-53929)
405 if (overThreshold && qFuzzyCompare(position, qreal(1.0)) && !contains(movePoint)) {
406 if (effEdge == Qt::LeftEdge || effEdge == Qt::RightEdge)
407 overThreshold = qAbs(movePoint.x() - q->width()) < dragMargin;
408 else
409 overThreshold = qAbs(movePoint.y() - q->height()) < dragMargin;
410 }
411
412 if (overThreshold) {
415 reposition();
417 }
418 event->setExclusiveGrabber(point, popupItem);
420 offset = offsetAt(movePoint);
421 }
422 }
423
424 return overThreshold;
425}
426#endif
427
429
430// Overrides QQuickPopupPrivate::blockInput, which is called by
431// QQuickPopupPrivate::handlePress/Move/Release, which we call in our own
432// handlePress/Move/Release overrides.
433// This implementation conflates two things: should the event going to the item get
434// modally blocked by us? Or should we accept the event and become the grabber?
435// Those are two fundamentally different questions for the drawer as a (usually)
436// interactive control.
438{
439 // We want all events, if mouse/touch is already grabbed.
441 return true;
442
443 // Don't block input to drawer's children/content.
445 return false;
446
447 // Don't block outside a drawer's background dimming
448 if (dimmer && !dimmer->contains(dimmer->mapFromScene(point)))
449 return false;
450
451 // Accept all events within drag area.
452 if (isWithinDragMargin(point))
453 return true;
454
455 // Accept all other events if drawer is modal.
456 return modal;
457}
458
460{
461 offset = 0;
462 velocityCalculator.startMeasuring(point, timestamp);
463
464 if (!QQuickPopupPrivate::handlePress(item, point, timestamp))
465 return interactive && popupItem == item;
466
467 return true;
468}
469
471{
472 Q_Q(QQuickDrawer);
473 if (!QQuickPopupPrivate::handleMove(item, point, timestamp))
474 return false;
475
476 // limit/reset the offset to the edge of the drawer when pushed from the outside
477 if (qFuzzyCompare(position, qreal(1.0)) && !contains(point))
478 offset = 0;
479
480 bool isGrabbed = popupItem->keepMouseGrab() || popupItem->keepTouchGrab();
481 if (isGrabbed)
482 q->setPosition(positionAt(point) - offset);
483
484 return isGrabbed;
485}
486
488{
489 auto cleanup = qScopeGuard([this] {
493 touchId = -1;
494 });
495 if (pressPoint.isNull())
496 return false;
499 return QQuickPopupPrivate::handleRelease(item, point, timestamp);
500 }
501
502 velocityCalculator.stopMeasuring(point, timestamp);
503 Qt::Edge effEdge = effectiveEdge();
504 qreal velocity = 0;
505 if (effEdge == Qt::LeftEdge || effEdge == Qt::RightEdge)
506 velocity = velocityCalculator.velocity().x();
507 else
508 velocity = velocityCalculator.velocity().y();
509
510 // the velocity is calculated so that swipes from left to right
511 // and top to bottom have positive velocity, and swipes from right
512 // to left and bottom to top have negative velocity.
513 //
514 // - top/left edge: positive velocity opens, negative velocity closes
515 // - bottom/right edge: negative velocity opens, positive velocity closes
516 //
517 // => invert the velocity for bottom and right edges, for the threshold comparison below
518 if (effEdge == Qt::RightEdge || effEdge == Qt::BottomEdge)
519 velocity = -velocity;
520
521 if (position > 0.7 || velocity > openCloseVelocityThreshold) {
523 } else if (position < 0.3 || velocity < -openCloseVelocityThreshold) {
525 } else {
526 switch (effEdge) {
527 case Qt::LeftEdge:
528 if (point.x() - pressPoint.x() > 0)
530 else
532 break;
533 case Qt::RightEdge:
534 if (point.x() - pressPoint.x() < 0)
536 else
538 break;
539 case Qt::TopEdge:
540 if (point.y() - pressPoint.y() > 0)
542 else
544 break;
545 case Qt::BottomEdge:
546 if (point.y() - pressPoint.y() < 0)
548 else
550 break;
551 }
552 }
553
554 // the cleanup() lambda will run before return
556}
557
564
565static QList<QQuickStateAction> prepareTransition(QQuickDrawer *drawer, QQuickTransition *transition, qreal to)
566{
567 QList<QQuickStateAction> actions;
568 if (!transition || !QQuickPopupPrivate::get(drawer)->window || !transition->enabled())
569 return actions;
570
571 qmlExecuteDeferred(transition);
572
573 QQmlProperty defaultTarget(drawer, QLatin1String("position"));
574 QQmlListProperty<QQuickAbstractAnimation> animations = transition->animations();
575 int count = animations.count(&animations);
576 for (int i = 0; i < count; ++i) {
577 QQuickAbstractAnimation *anim = animations.at(&animations, i);
578 anim->setDefaultTarget(defaultTarget);
579 }
580
581 actions << QQuickStateAction(drawer, QLatin1String("position"), to);
582 return actions;
583}
584
591
598
600{
601 Q_Q(QQuickDrawer);
602 switch (e) {
603 case Qt::LeftEdge:
604 case Qt::RightEdge:
605 allowVerticalMove = true;
606 allowVerticalResize = true;
607 allowHorizontalMove = false;
608 allowHorizontalResize = false;
609 break;
610 case Qt::TopEdge:
611 case Qt::BottomEdge:
612 allowVerticalMove = false;
613 allowVerticalResize = false;
614 allowHorizontalMove = true;
616 break;
617 default:
618 qmlWarning(q) << "invalid edge value - valid values are: "
619 << "Qt.TopEdge, Qt.LeftEdge, Qt.RightEdge, Qt.BottomEdge";
620 return false;
621 }
622
623 edge = e;
624 return true;
625}
626
628 : QQuickPopup(*(new QQuickDrawerPrivate), parent)
629{
630 Q_D(QQuickDrawer);
631 d->dragMargin = QGuiApplication::styleHints()->startDragDistance();
632 d->setEdge(Qt::LeftEdge);
633
634 setFocus(true);
635 setModal(true);
636 setFiltersChildMouseEvents(true);
637 setClosePolicy(CloseOnEscape | CloseOnReleaseOutside);
638}
639
652{
653 Q_D(const QQuickDrawer);
654 return d->edge;
655}
656
658{
659 auto realEdge = edge;
660 qreal rotation = window->contentItem()->rotation();
661 const bool clockwise = rotation > 0;
662 while (qAbs(rotation) >= 90) {
663 rotation -= clockwise ? 90 : -90;
664 switch (realEdge) {
665 case Qt::LeftEdge:
666 realEdge = clockwise ? Qt::TopEdge : Qt::BottomEdge;
667 break;
668 case Qt::TopEdge:
669 realEdge = clockwise ? Qt::RightEdge : Qt::LeftEdge;
670 break;
671 case Qt::RightEdge:
672 realEdge = clockwise ? Qt::BottomEdge : Qt::TopEdge;
673 break;
674 case Qt::BottomEdge:
675 realEdge = clockwise ? Qt::LeftEdge : Qt::RightEdge;
676 break;
677 }
678 }
679 return realEdge;
680}
681
683{
684 Q_D(QQuickDrawer);
685 if (d->edge == edge)
686 return;
687
688 if (!d->setEdge(edge))
689 return;
690
692 d->reposition();
694}
695
704{
705 Q_D(const QQuickDrawer);
706 return d->position;
707}
708
710{
711 Q_D(QQuickDrawer);
712 position = qBound<qreal>(0.0, position, 1.0);
713 if (qFuzzyCompare(d->position, position))
714 return;
715
716 d->position = position;
718 d->reposition();
719 if (d->dimmer)
720 d->dimmer->setOpacity(position);
722}
723
736{
737 Q_D(const QQuickDrawer);
738 return d->dragMargin;
739}
740
742{
743 Q_D(QQuickDrawer);
744 if (qFuzzyCompare(d->dragMargin, margin))
745 return;
746
747 d->dragMargin = margin;
749}
750
752{
753 setDragMargin(QGuiApplication::styleHints()->startDragDistance());
754}
755
768{
769 Q_D(const QQuickDrawer);
770 return d->interactive;
771}
772
773void QQuickDrawer::setInteractive(bool interactive)
774{
775 Q_D(QQuickDrawer);
776 if (d->interactive == interactive)
777 return;
778
779 setFiltersChildMouseEvents(interactive);
780 d->interactive = interactive;
781 emit interactiveChanged();
782}
783
785{
786 Q_D(QQuickDrawer);
787 switch (event->type()) {
788#if QT_CONFIG(quicktemplates2_multitouch)
790 return d->grabTouch(child, static_cast<QTouchEvent *>(event));
792 case QEvent::TouchEnd:
793 return d->handleTouchEvent(child, static_cast<QTouchEvent *>(event));
794#endif
796 return d->grabMouse(child, static_cast<QMouseEvent *>(event));
799 return d->handleMouseEvent(child, static_cast<QMouseEvent *>(event));
800 default:
801 break;
802 }
803 return false;
804}
805
807{
808 Q_D(QQuickDrawer);
809 d->grabMouse(d->popupItem, event);
810}
811
813{
814 Q_D(QQuickDrawer);
815 switch (event->type()) {
816#if QT_CONFIG(quicktemplates2_multitouch)
818 return d->grabTouch(item, static_cast<QTouchEvent *>(event));
819#endif
821 return d->grabMouse(item, static_cast<QMouseEvent *>(event));
822 default:
823 break;
824 }
826}
827
828#if QT_CONFIG(quicktemplates2_multitouch)
829void QQuickDrawer::touchEvent(QTouchEvent *event)
830{
831 Q_D(QQuickDrawer);
832 d->grabTouch(d->popupItem, event);
833}
834#endif
835
836void QQuickDrawer::geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
837{
838 Q_D(QQuickDrawer);
839 QQuickPopup::geometryChange(newGeometry, oldGeometry);
840 d->resizeDimmer();
841}
842
844
845#include "moc_qquickdrawer_p.cpp"
The QEventPoint class provides information about a point in a QPointerEvent.
Definition qeventpoint.h:20
\inmodule QtCore
Definition qcoreevent.h:45
@ MouseMove
Definition qcoreevent.h:63
@ MouseButtonPress
Definition qcoreevent.h:60
@ TouchUpdate
Definition qcoreevent.h:242
@ TouchBegin
Definition qcoreevent.h:241
@ MouseButtonRelease
Definition qcoreevent.h:61
static QStyleHints * styleHints()
Returns the application's style hints.
\inmodule QtGui
Definition qevent.h:196
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:217
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
Definition qpoint.h:343
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
Definition qpoint.h:348
bool isNull() const noexcept
Returns true if both the x and y coordinates are set to 0.0 (ignoring the sign); otherwise returns fa...
Definition qpoint.h:338
The QQmlProperty class abstracts accessing properties on objects created from QML.
void setDefaultTarget(const QQmlProperty &)
Side panel that can be opened and closed using a swipe gesture.
void reposition() override
QQuickDrawerPositioner(QQuickDrawer *drawer)
void showDimmer() override
void handleUngrab() override
bool prepareEnterTransition() override
bool handlePress(QQuickItem *item, const QPointF &point, ulong timestamp) override
void resizeDimmer() override
bool setEdge(Qt::Edge edge)
bool isWithinDragMargin(const QPointF &point) const
qreal positionAt(const QPointF &point) const
QQuickPopupPositioner * getPositioner() override
bool grabMouse(QQuickItem *item, QMouseEvent *event)
bool handleRelease(QQuickItem *item, const QPointF &point, ulong timestamp) override
bool startDrag(QEvent *event)
qreal offsetAt(const QPointF &point) const
Qt::Edge effectiveEdge() const
bool blockInput(QQuickItem *item, const QPointF &point) const override
void hideDimmer() override
bool handleMove(QQuickItem *item, const QPointF &point, ulong timestamp) override
bool prepareExitTransition() override
QQuickVelocityCalculator velocityCalculator
void setEdge(Qt::Edge edge)
void setPosition(qreal position)
void setDragMargin(qreal margin)
bool overlayEvent(QQuickItem *item, QEvent *event) override
QQuickDrawer(QObject *parent=nullptr)
void resetDragMargin()
void dragMarginChanged()
bool childMouseEventFilter(QQuickItem *child, QEvent *event) override
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void positionChanged()
void setInteractive(bool interactive)
bool isInteractive() const
void mouseMoveEvent(QMouseEvent *event) override
void edgeChanged()
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
void setKeepTouchGrab(bool)
Sets whether the touch points grabbed by this item should remain exclusively with this item.
void setSize(const QSizeF &size)
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
Definition qquickitem.h:72
QPointF mapFromScene(const QPointF &point) const
Maps the given point in the scene's coordinate system to the equivalent point within this item's coor...
qreal y
Defines the item's y position relative to its parent.
Definition qquickitem.h:73
virtual Q_INVOKABLE bool contains(const QPointF &point) const
\qmlmethod bool QtQuick::Item::contains(point point)
bool keepTouchGrab() const
Returns whether the touch points grabbed by this item should exclusively remain with this item.
qreal width
This property holds the width of this item.
Definition qquickitem.h:75
bool keepMouseGrab() const
Returns whether mouse input should exclusively remain with this item.
void setKeepMouseGrab(bool)
Sets whether the mouse input should remain exclusively with this item.
qreal rotation
\qmlproperty real QtQuick::Item::rotation This property holds the rotation of the item in degrees clo...
Definition qquickitem.h:106
void grabMouse()
qreal height
This property holds the height of this item.
Definition qquickitem.h:76
void setPosition(const QPointF &)
void setX(qreal)
bool isAncestorOf(const QQuickItem *child) const
Returns true if this item is an ancestor of child (i.e., if this item is child's parent,...
void setY(qreal)
static QQuickOverlay * overlay(QQuickWindow *window)
QQuickPopup * popup() const
virtual bool handlePress(QQuickItem *item, const QPointF &point, ulong timestamp)
bool handleMouseEvent(QQuickItem *item, QMouseEvent *event)
virtual bool handleMove(QQuickItem *item, const QPointF &point, ulong timestamp)
QList< QQuickStateAction > enterActions
virtual bool handleRelease(QQuickItem *item, const QPointF &point, ulong timestamp)
QQuickTransition * enter
QQuickPopupPositioner * positioner
QPointer< QQuickWindow > window
QList< QQuickStateAction > exitActions
virtual void handleUngrab()
bool contains(const QPointF &scenePos) const
QQuickTransition * exit
QQuickPopupItem * popupItem
QQuickPopupTransitionManager transitionManager
virtual bool prepareExitTransition()
virtual bool prepareEnterTransition()
static QQuickPopupPrivate * get(QQuickPopup *popup)
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
virtual bool overlayEvent(QQuickItem *item, QEvent *event)
bool isComponentComplete() const
QQmlListProperty< QQuickAbstractAnimation > animations
\qmlproperty list<Animation> QtQuick::Transition::animations \qmldefault
void startMeasuring(const QPointF &point1, qint64 timestamp=0)
void stopMeasuring(const QPointF &m_point2, qint64 timestamp=0)
static bool dragOverThreshold(qreal d, Qt::Axis axis, const QEventPoint *tp, int startDragThreshold=-1)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
QQuickItem * contentItem
\qmlattachedproperty Item Window::contentItem
\inmodule QtCore\reentrant
Definition qrect.h:484
constexpr void setY(qreal pos) noexcept
Sets the top edge of the rectangle to the given finite y coordinate.
Definition qrect.h:509
\inmodule QtCore
Definition qsize.h:208
QMap< int, QEventPoint > points
The QTouchEvent class contains parameters that describe a touch event.
Definition qevent.h:917
int width
the width of the window's geometry
Definition qwindow.h:82
int height
the height of the window's geometry
Definition qwindow.h:83
Combined button and popup list for selecting options.
@ RightEdge
@ TopEdge
@ BottomEdge
@ LeftEdge
@ XAxis
@ YAxis
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:333
bool qFuzzyIsNull(qfloat16 f) noexcept
Definition qfloat16.h:349
constexpr const T & qMax(const T &a, const T &b)
Definition qminmax.h:42
constexpr T qAbs(const T &t)
Definition qnumeric.h:328
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei count
GLenum GLuint GLintptr offset
struct _cl_event * event
GLfixed GLfixed GLint GLint GLfixed points
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
void qmlExecuteDeferred(QObject *object)
Definition qqml.cpp:49
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static const qreal openCloseVelocityThreshold
static bool keepGrab(QQuickItem *item)
static QList< QQuickStateAction > prepareTransition(QQuickDrawer *drawer, QQuickTransition *transition, qreal to)
QScopeGuard< typename std::decay< F >::type > qScopeGuard(F &&f)
[qScopeGuard]
Definition qscopeguard.h:60
QLatin1StringView QLatin1String
Definition qstringfwd.h:31
#define emit
unsigned long ulong
Definition qtypes.h:35
double qreal
Definition qtypes.h:187
QGraphicsItem * item
QLayoutItem * child
[0]
aWidget window() -> setWindowTitle("New Window Title")
[2]