PyQT QWebView Local swf file not loading

sgperone simone.perone at
Sun Jun 28 07:05:02 EDT 2009

Just downloaded the pyQT 4.5 for python 2.6 and noticed this strange

inside a widget i have this code:

self.view = QWebView(self)

that's i'm creating a QWebView instance with PluginsEnabled flag on.

next lines are:

Case 1
f = QtCore.QUrl("")
print f

in this case f == True and the swf file is showing correctly inside
the widget

Case 2
f = QtCore.QUrl.fromLocalFile(r"C:\myflashfile.swf")
print f

in this case f == False and no swf clip showed up.

Really weird... if I use a local html file with code to embed the
local swf file everything is working.

So, it seems that:

It is impossible to load a local swf file directly into QWebView
without a "wrapper" html code.

Anyone experienced the same issue ?


More information about the Python-list mailing list