Bug 356096 - MouseArea doesn't have the property cursorShape.
Summary: MouseArea doesn't have the property cursorShape.
Status: RESOLVED UNMAINTAINED
Alias: None
Product: QmlWeb
Classification: Unmaintained
Component: QtQuick (other bugs)
Version First Reported In: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Anton Kreuzkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-29 22:45 UTC by Igor A.
Modified: 2025-06-10 16:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor A. 2015-11-29 22:45:12 UTC
MouseArea doesn't have the property cursorShape.

Reproducible: Always
Comment 1 Igor A. 2015-11-29 22:48:30 UTC
I propose following changes

1. New enums in Qt 

  Key_Play: 250,
  Key_Sleep: 95,
  Key_Zoom: 251,
  Key_Cancel: 3,

  // CursorShape
  ArrowCursor: 0,
  UpArrowCursor: 1,
  CrossCursor: 2,
  WaitCursor: 3,
  IBeamCursor: 4,
  SizeVerCursor: 5,
  SizeHorCursor: 6,
  SizeBDiagCursor: 7,
  SizeFDiagCursor: 8,
  SizeAllCursor: 9,
  BlankCursor: 10,
  SplitVCursor: 11,
  SplitHCursor: 12,
  PointingHandCursor: 13,
  ForbiddenCursor: 14,
  WhatsThisCursor: 15,
  BusyCursor: 16,
  OpenHandCursor: 17,
  ClosedHandCursor: 18,
  DragCopyCursor: 19,
  DragMoveCursor: 20,
  DragLinkCursor: 21,
  LastCursor: 21, //DragLinkCursor,
  BitmapCursor: 24,
  CustomCursor: 25 
    
}


2.  the property

    createSimpleProperty("enum", this, "cursorShape");

3.  CSS cursor change

    this.dom.onmouseover = function(e) {
        self.containsMouse = true;
        self.dom.style.cursor = cursorShapeToCSS();
        self.entered();
    }
    this.dom.onmouseout = function(e) {
        self.containsMouse = false;
        self.dom.style.cursor = "auto";
        self.exited();
    }
    this.dom.onmousemove = function(e) {
        if (self.enabled && (self.hoverEnabled || self.pressed)) {
            var mouse = eventToMouse(e);
            self.positionChanged(mouse);
            self.mouseX = mouse.x;
            self.mouseY = mouse.y;
        }
    }
    
    function cursorShapeToCSS(){
        var cursor = "auto";
        switch (self.cursorShape) {
          case Qt.ArrowCursor: cursor = "default"; break;
          case Qt.UpArrowCursor: cursor = "auto";break;
          case Qt.CrossCursor: cursor = "crosshair";break;
          case Qt.WaitCursor: cursor = "wait";break;
            case Qt.IBeamCursor: cursor = "auto";break;
            case Qt.SizeVerCursor: cursor = "auto";break;
            case Qt.SizeHorCursor: cursor = "auto";break;
            case Qt.SizeBDiagCursor: cursor = "auto";break;
            case Qt.SizeFDiagCursor: cursor = "auto";break;
            case Qt.SizeAllCursor: cursor = "auto";break;
            case Qt.BlankCursor: cursor = "auto";break;
            case Qt.SplitVCursor: cursor = "auto";break;
            case Qt.SplitHCursor: cursor = "auto";break;
            case Qt.PointingHandCursor: cursor = "pointer";break;
            case Qt.ForbiddenCursor: cursor = "not-allowed";break;
            case Qt.WhatsThisCursor: cursor = "auto";break;
            case Qt.BusyCursor: cursor = "progress";break;
            case Qt.OpenHandCursor: cursor = "auto";break;
            case Qt.ClosedHandCursor: cursor = "move";break;
            case Qt.DragCopyCursor: cursor = "auto";break;
            case Qt.DragMoveCursor: cursor = "auto";break;
            case Qt.DragLinkCursor: cursor = "auto";break;
            case Qt.LastCursor: cursor = "auto";break;
            case Qt.BitmapCursor: cursor = "auto";break;
            case Qt.CustomCursor: cursor = "auto";  break;
        }
        return cursor;
    }
Comment 2 Justin Zobel 2021-03-09 07:30:28 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.
Comment 3 Christoph Cullmann 2025-06-10 16:57:32 UTC
This project is unfortunately no longer maintained.

If a new maintainer wants to step up and take care, the project is archived here:

https://invent.kde.org/unmaintained/qmlweb

You can just clone it in your private namespace on invent.kde.org and if you have started to work on it and fixed/implemented something get it reviewed and the project unarchived.

Sorry for the inconveniences.