TypeError: Cannot call method 'hasOwnProperty' of null, while creating a QMLscene window

Posted by tomoqv on Ask Ubuntu See other posts from Ask Ubuntu or by tomoqv
Published on 2013-11-03T20:22:26Z Indexed on 2013/11/03 22:17 UTC
Read the original article Hit count: 422

I am trying to make a simple Ubuntu Touch web application with Qt Creator. I have set up a new project according to the tutorial and committed the files to Bazaar. I have set a url instead of the default index.htm in the qml file of the project. Using build->run loads a QML Scene window with the desired webpage, but Qt Creator yields the following output:

Starting /usr/lib/i386-linux-gnu/qt5/bin/qmlscene -I /home/tomas/ubuntu-sdk/SL-planner -I /usr/bin -I /usr/lib/i386-linux-gnu/qt5/qml /home/tomas/ubuntu-sdk/SL-planner/SL-planner.qml
unity::action::ActionManager::ActionManager(QObject*):
Could not determine application identifier. HUD will not work properly.
Provide your application identifier in $APP_ID environment variable.
file:///usr/lib/i386-linux-gnu/qt5/qml/Ubuntu/Components/MainView.qml:257: TypeError: Cannot call method 'hasOwnProperty' of null

My SL-planner.qml looks like this:

import QtQuick 2.0
import Ubuntu.Components 0.1
import QtWebKit 3.0

/*!
    \brief MainView with a Flickable WebView.
*/

MainView {
    // objectName for functional testing purposes (autopilot-qt5)
    objectName: "mainView"

    // Note! applicationName needs to match the "name" field of the click manifest
    applicationName: "com.ubuntu.developer.tomoqv.SL-planner"

    /* 
     This property enables the application to change orientation 
     when the device is rotated. The default is false.
    */
    automaticOrientation: true

    width: units.gu(100)
    height: units.gu(75)

    Flickable {
        id: webViewFlickable
        anchors.fill: parent

        WebView {
            id: webView
            anchors.fill: parent
            url: "http://mobil.sl.se"
        }
    }
}

What am I missing?

© Ask Ubuntu or respective owner

Related posts about application-development

Related posts about ubuntu-touch