WebView Flash not working: using qt quick 1 code model instead of qt quick 2



  • When using WebView in QT5.2/5.3 MSV2012 32 bit/64 bit windows qtquick 2, there is green line under the Webview giving the warning: "using qt quick 1 code model instead of qt quick 2". Also, eventhough I enable the flash plugins, they are not enabled. The same code and same plugin works fine in QT5.3, mingw version. The foll is the code:
    import QtQuick 1.1
    import QtWebKit 1.0
    Rectangle {
    width: 1000
    height: 1000

    WebView {
        anchors.fill: parent
        settings.javaEnabled: true
        settings.pluginsEnabled: true
        url:"http://www.youtube.com"
    }
    

    }
    I used QT+=webkit in the .pro file and I pasted NPSWF32_13_0_0_214.dll in the plugins folder of the debug folder of the app. Also I set the QTWEBKIT_PLUGIN_PATH as C:/Windows/SysWOW64/Macromed/Flash in the environmental variable.
    Please let me know any steps I have missed to make flash working under windows for QT5.2 with QTQuick 2



  • Sorry posted the wrong code (the code that works fine with Qt4.8.2 and QtQuick 1.0 with QtWebKit 1.0). Following is the code that does not work in QtQuick 2.0, Qt5.2.1 64bit windows MSV2012:

    import QtQuick 2.1
    import QtQuick.Controls 1.0
    import QtQuick.Window 2.0
    import QtQuick.Layouts 1.0
    import QtWebKit 3.0
    import QtWebKit.experimental 1.0

    ScrollView {
    width: 1000
    height: 1000
    WebView {
    id: webview
    url: "http://www.youtub.com"
    anchors.fill: parent

        experimental.preferences.pluginsEnabled: true
        experimental.preferences.javascriptEnabled: true
    
    }
    

    }



  • Sorry posted the wrong code (the code that works fine with Qt4.8.2 and QtQuick 1.0 with QtWebKit 1.0). Following is the code that does not work in QtQuick 2.0, Qt5.2.1 64bit windows MSV2012:

    import QtQuick 2.1
    import QtQuick.Controls 1.0
    import QtQuick.Window 2.0
    import QtQuick.Layouts 1.0
    import QtWebKit 3.0
    import QtWebKit.experimental 1.0

    ScrollView {
    width: 1000
    height: 1000
    WebView {
    id: webview
    url: "http://www.youtube.com"
    anchors.fill: parent

        experimental.preferences.pluginsEnabled: true
        experimental.preferences.javascriptEnabled: true
    
    }
    

    }



  • In fact, my problem is exactly same as in : https://bugreports.qt-project.org/browse/QTCREATORBUG-11666
    The solution given there is to 'correctly configure Qt project'. How to correctly configure it? I have uninstalled all the different versions of Qt. At present I have only Qt5.2 opengl 2012 win64 installed. But still I get the same problem. I try to create a new project using the Qt's default GUI.



  • Hi, I'm having the same problem, I thought maybe it was a misconfiguration on Arch Linux, I deleted all the Qt5 (5.3) packages and configurations and reinstalled everything. Checked the kits many times. But the result is always the same.

    Then I made a clean install of Qt 5.3 (Mingw, OpenGL, x86) in a Windows XP machine which never had any Qt before with the official binary from this site, and I have the exact same issue. I'm pretty sure this is a bug in Qt, not some misconfiguration, I didn't touch anything in the Win install.

    The steps to reproduce are easy:

    1. Create a Qt Quick Application Project.
    2. In the main.qml file import QtWebKit 3.0 and add a WebView.

    It will underline the WebView as an issue, check the issue and it says: Using Qt Quick 1 code model instead of Qt Quick 2.
    Try to run the app, it shows the window and instantly crashes.

    Can anyone knowledgeable confirm this is a bug in the Qt build a not a misconfiguration? Thanks in advance



  • Hi I'm having the same problem. I tried create new qtquick project problem is the same but Some time it working normally.
    Anyone can help me ?


Log in to reply
 

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