I am creating a small Android application in Qt 5.10. The application consists of a main.qml that holds a Qt StackView. In this StackView one Qt Flickable page is defined with a button on it to navigate to a new page, which is a Qt WebView. After navigation, this WebView will load a local HTML page. But when I hit the Android back button on the second page the app will not navigate back to the first one. See the code below for more information.

main.qml
Qt Code:
  1. import QtQuick 2.10
  2. import QtQuick.Controls 2.2
  3.  
  4. ApplicationWindow {
  5. id: appWindow
  6. visible: true
  7.  
  8. StackView {
  9. id: navPane
  10. anchors.fill: parent
  11. initialItem: pageOne
  12.  
  13. Keys.onBackPressed: {
  14. popOnePage()
  15. }
  16.  
  17. function popOnePage() {
  18. if(navPane.depth == 1)
  19. return
  20. pop()
  21. }
  22.  
  23. function pushOnePage(pageComponent) {
  24. push(pageComponent)
  25. }
  26. }
  27.  
  28. Component {
  29. id: pageOne
  30. PageOne {}
  31. }
  32.  
  33. Component {
  34. id: pageTwo
  35. PageTwo {}
  36. }
  37. }
To copy to clipboard, switch view to plain text mode 
PageOne.qml
Qt Code:
  1. import QtQuick 2.10
  2. import QtQuick.Controls 2.2
  3.  
  4. Flickable {
  5.  
  6. Button {
  7. text: "Go to page 2"
  8. anchors.centerIn: parent
  9.  
  10. onClicked: {
  11. navPane.pushOnePage(pageTwo)
  12. }
  13. }
  14. }
To copy to clipboard, switch view to plain text mode 
PageTwo.qml
Qt Code:
  1. import QtQuick 2.10
  2. import QtWebView 1.1
  3.  
  4. WebView {
  5. id: webView
  6. url: initialUrl //link to local HTML file
  7. }
To copy to clipboard, switch view to plain text mode 
After some debugging I found out that the Keys.onBackPressed signal is never received. But when I use a Flickable instead of a WebView the signal will be received and the navigation works as expected. Can someone tell me if it is possible to receive this signal while using a WebView or maybe tell me what I am doing wrong? It will also do for me if there exists another component that can work with HTML. Any help would be greatly appreciated!