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

Android: Back button doesnt work in different focus situations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.3.0 Beta1
    • 5.2.0
    • QPA
    • None
    • OpenSuSe 13.1
      Qt 5.2.0 / QtCreator 3.0
    • Android
    • 08ba111719c8c4809e80e1dc8a1956dcfdd9d80d 1567699c0e5681b577ab203274181105d226116c 80d4a19f514f66c4ef2c8b5aa40039fdb6b8dd53

    Description

      During work on 4.8 --> 5.2 necessitas port of my project i realized some problems with the back button.
      I checked two different misbehaviours of the back button on a mainwindow or dialog:

      1. The back button doesnt really work at all. The dialog doesnt close ...

      2. The back button doesnt close the current dialog on top but the below one. So if you have following dialog stack e.g.: 1. mainwindow, 2. dialog1, 3. dialog2
      If you hit the back button in some situation the dialog1 on position 2 is closed and you see the maindow. In some situation with just 2 stack positions it closes the whole app.

      In the app with multiple stacks of dialogs at first it doesnt seems to really have a system when the back button works or not. But during playing around i've found a solution to reproduce at least the 1. form of back button misbehavoir (no reaction). Here are the steps to reproduce:

      1. Build the "standarddialogs" example
      2. Start the app (I've tested this in api10 and api19 emulator)
      3. Navigate to FontDialog and hit the QFontDialog::getFont() button
      4. Try the back button --> doesnt work for me
      5. Tap somewhere in the listwidget
      6. Try the back button again--> doesnt work for me
      7. Tap into the checkbox "Underlined" and check it
      8. Try the back button --> WORKS - dialog closed.

      Another Test:
      QInputDialog::getInt() --> Hit the button, when the dialog appears just hit the back button --> WORKS - dialog closed

      Another VERY interesting Test:
      QInputDialog::getItem() --> Hit the button, when the dialog appears just hit the back button --> doesnt work (Maybe interesting the OK button has autofocus) --> NOW hit the TAB button to move the focus to the CANCEL button and hit the back button again --> THIS closes the dialog!

      Doing these tests i realized that it seems to has to do with different focus situations. I tried to play around in my app with multiple this->setFocus() in the exec() reimplementation to avoid the below dialog to be closed etc. but it leads to very messy code and it doesnt help to get the back button work in every situation ... so currently the back button behavious is a bit confusing for the users.

      Attachments

        Issue Links

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

          Activity

            People

              tvete Paul Olav Tvete
              doitux Felix Hammer
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes