'Pages in qt webengineview cannot be scrolled by touch
I have a 32-bit qt program of webengineview (qt version is 5.14.2), running on a computer with win10 system, and the computer has a touch screen. At the beginning, I could zoom in and out of the page with touch gestures, and I could scroll the page, but after zooming in and out a few times, both zooming in and zooming out didn't work, and I couldn't scroll the page. But elements on the page can be clicked.
By print the events in js, both touchstart and touchmove events are received, but there is no scroll event. Under normal circumstances, a scroll event will be triggered after touchmove.
How can I fix this problem? How is the scroll event triggered? Why can it be triggered at the beginning, but after zooming in and out multiple times, the scroll event cannot be triggered?
I also tried it in the demo simplebrowser in qt, and this problem also exists. The phenomenon of the problem is that the webpage displayed in qwebengineview cannot scroll when the finger slides on the touch screen sometimes. I added listener for touch-events in JavaScript,
document.addEventListener('touchstart',function (event) {
console.log('touchstart') })
document.addEventListener('touchmove',function (event) {
console.log('touchmove')})
document.addEventListener('scroll',function (event) {
console.log('scroll')})
touchstart and touchmove print when finger slides on touch screen, but scroll event doesn't print.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
