Qt.py QWebView

94 views
Skip to first unread message

Jesse Kretschmer

unread,
Jan 29, 2018, 11:16:20 AM1/29/18
to Python Programming for Autodesk Maya
Hello,
I just decided to make the jump into Maya2018 and I was playing with Qt.py to help with the transition. I just noticed that it is entirely missing QWebView. I tried both QtWebEnginWidgets and QtWebKitWidgets, but I see now that neither is implemented.

Does anyone have a workaround? 

I'm using ftrack and some of the "free" web-widgets in my tools, and I'd like to keep using them. I see some recent activity on the github, so I have to imagine that Qt.py is still being developed.

Cheers,
Jesse

Marcus Ottosson

unread,
Jan 29, 2018, 11:31:57 AM1/29/18
to python_in...@googlegroups.com
Unfortunately QWebView isn't portable across Qt 4 and 5, that's why it isn't part of Qt.py​

Jesse Kretschmer

unread,
Jan 30, 2018, 5:11:54 AM1/30/18
to Python Programming for Autodesk Maya
I found QWebEngineView does what I need. It looks like spyder-ide/qtpy is using the QWebEngineView. I've made a pull request.


On Mon, Jan 29, 2018 at 5:31 PM, Marcus Ottosson <konstr...@gmail.com> wrote:
Unfortunately QWebView isn't portable across Qt 4 and 5, that's why it isn't part of Qt.py​

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOCpJ%2B2YWuL5hBzgcAWsFT_o329iMatcWKN%3DCV9dE4Wg-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Marcus Ottosson

unread,
Jan 30, 2018, 5:35:28 AM1/30/18
to python_in...@googlegroups.com
Well, QWebEngineView is also not portable. :) It's only available in Qt 5.​

Jesse Kretschmer

unread,
Jan 30, 2018, 5:58:45 AM1/30/18
to Python Programming for Autodesk Maya
Certainly not directly between versions, but is that not why Qt.py exists? 

QWebEngineView is the new QWebView. It would be really convenient for me to a single place to access a WebView widget across all my platforms. From what Fredrik posted in my pull-request, I should be able to handle some of this in the QtSiteConfig.py. I'm looking into that now. 

Jesse Kretschmer

unread,
Jan 30, 2018, 10:48:49 AM1/30/18
to Python Programming for Autodesk Maya
I had good success with a custom QtSiteConfig.py. It required the latest 1.1.0, but I've now started porting my tools. After the QtSiteConfig changes, the QWebEngineView was easily loaded (even if it was really a QWebView in some environments).
from Qt.QtWebEngineWidgets import QWebEngineView as QWebView
It would be great if we could have QtWebEngineWidgets directly available in Qt.py.
Reply all
Reply to author
Forward
0 new messages