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

Ui does not highlight different elements when cursor hovers over them.



  • I've encountered an unexpected behavior when trying to combine QWebEngineView and QTabWidget. Switching in between tabs causes UI to not update, for example, push buttons when cursor hovers over them.
    I have a tab widget with 3 tabs. Tab1 and Tab2 are identical as they contains a QWebEngineView and a push button. Tab3 only contains a push button.

    If I start the application on Tab3, hovering over Tab1 and Tab2 results in the tabs highlighting correctly as well as the Tab3 push button highlights. Clicking on either Tab1 or Tab2 then going back to Tab3 results in nothing highlighting anymore. Neither the tabs or the button highlight when I hover over them.

    Tab1 and Tab2 do not have this issue. Only the tab that does not contains a QWebEngineView has this issue.

    Below are a couple screenshots for a sample project I just generated. Other than setting up the UI there is nothing else added to the project.

    0_1564667963598_ba4a6dff-5009-4905-9cb9-ea18a33e4a01-image.png

    Can't get the cursor to show up in the screenshots but I hovered over Tab3 with the mouse and you can see the tab highlights.

    0_1564668076527_0d79391e-a7c3-431c-b8ac-9572ec0860a5-image.png

    In above screenshot I switched to Tab3 and placed cursor over Tab2 however the tab does not highlight. The push button acts in the same way. The click events still work as clicking on Tab1 or Tab2 switches the view correctly.

    If I add a QWebEngineView to Tab3, everything then works perfectly.

    Any input on this strange behavior would be greatly appreciated!


Log in to reply