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

QtQuick: DropArea does not work when placed over WebEngineView

    XMLWordPrintable

Details

    • Linux/X11, Windows

    Description

      My application consists of several rectangles which are all draggable and may be dropped on empty spaces as well as on one another.

      These rectangles in turn contain various contents. You may see them as sort of sub-windows which may be dragged around and placed in one of the application windows as well as stacked on one another. For this there are DropArea instances covering the contents.

      The first rectangle content I'm working on is a WebEngineView. And the DropArea covering it does not work.

      I've attached a minimal implementation which reproduces the problem along with two log files I've created with it on Linux. (On Windows the behavior is even worse.)

      When you start this application then a Window opens containing two blue rectangles. The one on the left side contains a WebEngineView as well.

      The right rectangle accepts drops from the left one.

      The left rectangle does not accept any drops (the DropArea sets drag.accepted to false).

      Now try the following:

      1. Drag the right rectangle into the WebEngineView
        Expected behavior: The drop is not permitted because my DropArea rejects the enter event -> the right rectangle's color is set to red.
        Or expected alternatively: The drop is accepted by the WebEngineView and Drop.target tells a difference between my DropArea and the WebEngineView so that I have a chance to indicate an invalid drop (e.g. color = red).
        Observed behavior: dropArea.onEntered is called every mouse move event. Drop is accepted with action 2 (MoveAction). Drop.target is always null.
      2. Click on the upper visible (colored) part of the left left rectangle and drag it into its own child WebEngineView.
        Expected behavior: The drop is not permitted because my DropArea rejects drops on the same rectangle -> the left rectangle's color is set to red.
        Or expected alternatively: The drop is accepted by the WebEngineView and Drop.target tells a difference between my DropArea and the WebEngineView so that I have a chance to indicate an invalid drop (e.g. color = red).
        Observed behavior: DropArea.onEntereed is never called but the Drop is accepted with action 2 (MoveAction). Drop.target is always null.

      I see two main problems here:

      • DropArea behaves weird when placed upon a WebEngineView.
      • There is no chance to distinguish a wanted from an unwanted drop in Drag.onDragFinished() because Drag.target is always null.

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            cyril Harald Prasser
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes