Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. Display local flash.swf
Forum Updated to NodeBB v4.3 + New Features

Display local flash.swf

Scheduled Pinned Locked Moved Qt WebKit
3 Posts 1 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    archdove
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      archdove
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      • A Offline
        A Offline
        archdove
        wrote on last edited by
        #3

        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..

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved