GeordieM Posted June 15, 2018 Share Posted June 15, 2018 (edited) Hi all, I'm creating a python panel tool with a web front end. I've successfully put a Qt WebEngineView in a Python panel, but when the panel is hidden and displayed again (ie switching tabs in Houdini UI) the main loop of WebEngineView seems to pause. Any animations stop and all mouse/keyboard interaction stops. If I resize the panel it will recover most of the time. I assume I have to call something on WebEngineView when then the python panel onActivateInterface() is called but I can't see anything obvious in the Qt docs http://doc.qt.io/qt-5/qml-qtwebengine-webengineview.html#WebAction-prop PS: I'm on Win 10. Anyone solved this before? TNKS! G Edited June 15, 2018 by GeordieM Quote Link to comment Share on other sites More sharing options...
GeordieM Posted June 15, 2018 Author Share Posted June 15, 2018 Small update, I can get WebEngineView to start updating by calling: self.resize(self.width()-1, self.width()-1) self.resize(self.width(), self.width()) Here my class inherits from QtWebEngineWidgets.QWebEngineView. BUT as soon as the mouse enters the QWebEngineView control it freezes again. Quote Link to comment Share on other sites More sharing options...
GeordieM Posted June 18, 2018 Author Share Posted June 18, 2018 So this is a focus related issue but haven't worked out a good callback to use. But have worked out a slightly dodgy solution. Instead of inheriting from QWebEngineView directly I inherit from QWidget and then add a QWebEngineView. I then listen for the timerEvent event on the python panel and call QWebEngineView.update() every 0.5 seconds. This works well but probably not the best solution. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.