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

QGraphicsView doesn't support focus change on mouse release

    XMLWordPrintable

Details

    Description

      Currently QGraphicsView/Scene do focus changes on mouse press and the behavior is quite hardcoded there. This is very bad for touch based devices that implement panning. Without nasty workarounds, starting to pan would move the focus away from what was focused, and panning shouldn't really have any side-effects. Furthermore, with virtual keyboard the focus change might make changes there and that, as consequence, might trigger text entry relocation on the application side for ensuring visibility. To bypass these problems, Meegotouch currently delays passing mouse presses to QGraphicsScene, which is not too nice.

      What should really happen is possibility to have focus changes on mouse release.

      Couple possibilities:

      • Add a flag to change focus behavior and introduce a way for pannable widgets to omit the change on following release.
      • Introduce a flag for QGraphicsItem that would make the item behave as "black holes" for focus changes. Clicks on those would not have absolutely any side-effects on the focus. Should be easy to implement. Pannable widgets would then have to re-implement focus handling.

      As QML is using QGraphicsView, this naturally reflects there also.

      Attachments

        1. main.cc
          4 kB
        2. main.cc
          4 kB
        3. main.cc
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            smd Jan Arve
            pvuorela Pekka Vuorela
            Votes:
            8 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes