[Interest] QQmlApplicationEngine's rootObject() returns 0 objects count when trying to import of JavaScript file from Remote Server

ashish dabhade ashishd157 at gmail.com
Fri Nov 14 05:49:45 CET 2014


Yes it is accessible (for confirmation tested with another browser). I'm
using Apache server and the JavaScript file is in it's default site
location i.e /var/www/html. As stated earlier in my second mail, I'm
testing it with the Qt Quick UI project ("Qt Creator > New File or Project
> Application > Qt Quick UI") and not Qt Quick Application Project, so here
I don't have access to QQmlApplication engine and hence objectCreated
signal in QuickUI.qmlproject.

On Thu, Nov 13, 2014 at 10:46 PM, Alejandro Exojo <suy at badopi.org> wrote:

> El Thursday 13 November 2014, ashish dabhade escribió:
> > import QtQuick 2.3
> > import "http://192.168.1.2/sample.js" as Remote
> >
> > Rectangle {
> >     width: 100
> >     height: 62
> >
> >     MouseArea {
> >         anchors.fill: parent
> >         onClicked: Remote.myFunction()
> >     }
> > }
> >
> >
> > but it crashed here. Following is the log:
> >
> > Starting /home/ashish/Qt-Main/5.3/gcc/bin/qmlscene...
> >
> > /home/ashish/Qt-Main/5.3/gcc/bin/qmlscene exited with code 255
> >
> > Is it related to the first scenario ?
>
> It might be. Is the objectCreated signal triggered? Is the sample.js
> properly
> accessible? We don't have access to your 192.168.1.2 to test.
>
> --
> Alex (a.k.a. suy) | GPG ID 0x0B8B0BC2
> http://barnacity.net/ | http://disperso.net
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20141114/15d72763/attachment.html>


More information about the Interest mailing list