Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-36368

Cannot change application cursor if WebView is beeing used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.3.0 Beta1, 5.3.0
    • 5.2.0
    • WebKit
    • None
    • Linux/X11
    • dddf2c7d66ed7169ab03e0469b6ffec400e00050

    Description

      I'm writing an application like a media player but with HTML content. After some time of inactivity I'd like to hide the mouse cursor.

      The following code does not work as expected.

      import QtQuick 2.1
      import QtQuick.Controls 1.0
      import QtWebKit 3.0
      
      ApplicationWindow {
          title: qsTr("Hello World")
          width: 640
          height: 480
      
          WebView {
              anchors.fill: parent
          }
      
          MouseArea {
              cursorShape: Qt.BlankCursor
              acceptedButtons: Qt.NoButton
              anchors.fill: parent
          }
      }
      

      I'd expect the MouseArea to override the WebView, but instead the cursor is still always shown. If I remove the WebView, the cursor is properly hidden.

      Also I've tried setting the cursor using QApplication::setOverrideCursor(QCursor(Qt::BlankCursor)); but it doesn't work as well.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mibrunin Michael Bruning
            conny Cornelius Hald
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes