summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Jeisecke <jeisecke@saltation.de>2012-04-15 02:51:42 -0700
committerJens Bache-Wiig <jens.bache-wiig@nokia.com>2012-04-15 02:51:42 -0700
commitb32195820cecc50c5ba3994acfa8f90d8460360d (patch)
treef68261ca0338e8c26aa0241de1e1f14d1eab2f93
parent8924c12ee1f8194c65e492effe1b5105a842f081 (diff)
downloadqtquickcontrols-b32195820cecc50c5ba3994acfa8f90d8460360d.tar.gz
Change the QCursorArea to set the ArrowCursor explicitly.
Prior to this fix it was not possible to use a QCursorArea with an arrow cursor that covers another QCursorArea with some special cursor set. A typical use case would be a popup that should never show any cursors of underlying items. It is now also possible to reset the cursor, which actually makes the QCursorArea do nothing (apart from using resources). Merge-request: 17 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
-rw-r--r--src/qcursorarea.cpp5
-rw-r--r--src/qcursorarea.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/src/qcursorarea.cpp b/src/qcursorarea.cpp
index d0ca888b..01250ba1 100644
--- a/src/qcursorarea.cpp
+++ b/src/qcursorarea.cpp
@@ -28,7 +28,7 @@
QCursorArea::QCursorArea(QDeclarativeItem *parent)
: QDeclarativeItem(parent),
- m_cursor(ArrowCursor)
+ m_cursor(DefaultCursor)
{
}
@@ -39,6 +39,9 @@ void QCursorArea::setCursor(Cursor cursor)
return;
switch (cursor) {
+ case DefaultCursor:
+ QDeclarativeItem::setCursor(QCursor());
+ break;
case ArrowCursor:
QDeclarativeItem::setCursor(Qt::ArrowCursor);
break;
diff --git a/src/qcursorarea.h b/src/qcursorarea.h
index bdff2a7b..23107faa 100644
--- a/src/qcursorarea.h
+++ b/src/qcursorarea.h
@@ -37,6 +37,7 @@ class QCursorArea : public QDeclarativeItem
public:
enum Cursor {
+ DefaultCursor,
ArrowCursor,
SizeHorCursor,
SizeVerCursor,