[Qt-qml] Plugin example [was: Re: A simple, complete example of QML onvoking C++?]

Matthias Ettrich matthias.ettrich at nokia.com
Fri Apr 16 11:30:50 CEST 2010


If you execute

 qml plugins.qml

you should get an error message:

plugins.qml:1:1: module "com.nokia.TimeExample" is not installed 
     import com.nokia.TimeExample 1.0 // import types from the plugin 


If you execute with

  qml -I . plugins.qml

it works.

Matthias


On Friday 16 April 2010 09:46:17 ext Alain FLORET wrote:
> Hi,
> 
> This example is useful for me too, but i've a question about the plugins
> example of qt examples, if i compile it and try to execute "qml
> plugins.qml" nothing appears in qmlviewer, something is wrong in the
> qmldir or miss something ?
> 
> Another question is if i create a plugin in a tree  like
> "plugins/graphic/base" how can i access it from a QApplication, i must
> use QDeclarativeEngine or QDeclarativeView and set Engine ImportPath() ?
> Is someone have an example of that ?
> 
> Thanks.
> 
> FLORET Alain
> Developer
> CORYS TESS
> E-mail : afloret at corys.fr
> --



More information about the Qt-qml mailing list