Display local flash.swf



  • Hi Guys

    I Have to display several local flash files in qml/webkit. At this point i fail while loading the first one for no particular reason.

    The Setup is easy:
    [Code] WebView {
    anchors.fill: parent
    //url: Qt.resolvedUrl(localFile)
    html: "<html><head><title>Hello, world!</title></head>" +
    "<body>Hello, world!</body>"+
    "</html>"
    }
    [/code]

    Trying to load the file directly (row 3.) will show me a grey background and nothing more.
    Loading html directly will give me:
    [code]file://...main.qml:34:9: Cannot assign to non-existent property "html"
    html: "<html><head><title>Hello, world!</title></head>" +
    ^ [/code]

    I could create a local html file embedding the flash but that would be a pain in the ass and way too much work for this simple problem.

    Any idea?

    Edit:

    I found that Webkit provides a method called loadHtml() which is supposed to bypass url und directly display plain html. However this method is not found with the same "non-existent property"-error explained above.

    Maybe i have to add something to the .pro file?



  • Ok. I can access the webkit methods by doing something like
    [code]
    WebVew{
    Component.loadHtml()
    }
    [/code]

    I would like to read some more details about how this works. Is this implicit by using any kind of components? So its basically possible for any QObject?



  • So. Thats not working.
    Only thing i get is a white window...

    Is this even possible? Any advise? Example?
    Would be much appreciated. For now i go whith the html-fil-in-ram approach..


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.