0

I'm trying with QWebView.mask() in PyQt4 or PySide or PySide2, for convert the transparent pixels of a transparent QWebView into a window mask, like a frameless window with custom shape, but not work, the window is translucent.

webview = QtWebKit.QWebView()
mask = webview.mask()
webview.setMask(mask)

Why this not work, what alternatives exist and how i can solve this?

note: I'm trying with QWidget too, and still not works.

widget = QtGui.QWidget()
mask = widget.mask()
widget.setMask(mask)

Something like this: Using an alpha transparent mask on a QWidget?

but for PyQt4, not for Qt, because im working on scripting...

kunidoyac
  • 9
  • 5

1 Answers1

0

Maybe this?

webview.setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)

widget.setAttribute(QtCore.Qt.WA_TransparentForMouseEvents)

This is applicable for BOTH, i hope this help you...

Vaye
  • 1