Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QWebView and Keyboard interaction



  • Hi all,

    I putted a QWebView onto my window form and load a website. Everything was fine. Now I don't want to back history when I press the Backspace key on QWebView (but Backspace key is still allowed inside page input fields), how to do that?

    Thanks so much!



  • implement a keyPressEvent and then ignore the backspace key.



  • but I don't want to prevent users from using the Backspace key in html input fields



  • i don't understand when backspace key will be act like "history back". probably it's not about when an input object is focused. Maybe you could catch it with some javascript code.


Log in to reply