S
sgperone
Just downloaded the pyQT 4.5 for python 2.6 and noticed this strange
behaviour:
inside a widget i have this code:
self.view = QWebView(self)
self.view.settings().setAttribute(QWebSettings.PluginsEnabled,True)
that's i'm creating a QWebView instance with PluginsEnabled flag on.
next lines are:
Case 1
===================================================
f = QtCore.QUrl("http://www.example.com/myflashfile.swf")
print f
self.view.load(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
self.view.load(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 ?
Thanks
behaviour:
inside a widget i have this code:
self.view = QWebView(self)
self.view.settings().setAttribute(QWebSettings.PluginsEnabled,True)
that's i'm creating a QWebView instance with PluginsEnabled flag on.
next lines are:
Case 1
===================================================
f = QtCore.QUrl("http://www.example.com/myflashfile.swf")
print f
self.view.load(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
self.view.load(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 ?
Thanks