×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2009
    Posts
    18

    Using a QML extension plugin on device

    Hi Guys I have been following this example to install a QML extension plugin
    http://wiki.forum.nokia.com/index.ph...-in_in_Symbian

    The plugin has been installed successfully to the following location:
    c:\sys\bin\testQMLPluginDep.dll
    and its stub to:
    c:\resource\qt\imports\testQMLPluginDep.qtplugin

    Now to use it in a QML file, I tried the following lines in the qmldir file which all resulted in the qml file to fail to launch because MyItem is undefined:
    Code:
    plugin testQMLPluginDep
    plugin testQMLPluginDep c:/sys/bin
    plugin testQMLPluginDep c:\sys\bin
    plugin testQMLPluginDep c:\\sys\\bin
    plugin testQMLPluginDep c:\resource\qt\imports\
    plugin testQMLPluginDep c:\\resource\\qt\\imports
    plugin testQMLPluginDep c:/resource/qt/imports
    I also copied the stub file to the same folder containing the QML file using it.

    The folder of the QML files is on the memory card.

    Question-1
    What is the correct path to use in qmldir to refer to my plugin ? given that my plugin and its stub reside in the following folders:
    c:\sys\bin\testQMLPluginDep.dll
    c:\resource\qt\imports\testQMLPluginDep.qtplugin

    Question-2
    my plugin has no capability , could this be the problem ? and if yes, what is the basic capability for a QML extension plugin (mine just registers a type that draws a rect) ?

  2. #2
    Registered User
    Join Date
    Apr 2009
    Posts
    23

    Re: Using a QML extension plugin on device


  3. #3
    Registered User
    Join Date
    May 2009
    Posts
    18

    Re: Using a QML extension plugin on device

    First thanks for trying to answer.
    Next time can I ask you to at least bother yourself to read the question before answering ?
    The link you suggested is mentioned in my question (second line)
    Let me recap:

    1) Plugin is successful installed to the following locations
    c:\sys\bin\testQMLPluginDep.dll
    c:\resource\qt\imports\testQMLPluginDep.qtplugin

    2) plugin testQMLPluginDep in qmldir file is not working

    3) also tied to copy the stub file to the same folder of qmldir file

    Note I haven't assigned any capabilities to my plugin

  4. #4
    Nokia Developer Moderator
    Join Date
    Jul 2006
    Location
    Tampere, Finland
    Posts
    13

    Re: Using a QML extension plugin on device

    It should be enough if you have only "plugin testQMLPluginDep" in your qmldir file.

    Could the problem be a missing Q_EXPORT_PLUGIN2, QML_DECLARE_TYPE or qmlRegisterType? I've attached a simple test plugin (Circle element) that I created and which seems to work fine, perhaps you can check if there are some differencies in your implementation.

    CircleItem.zip

    Here's also a small test application for the plugin:
    Code:
    import Qt 4.7
    import com.nokia.Circle 1.0
    
    Rectangle {
        width: 360
        height: 360
        CircleItem {
            color: "lightblue"
            anchors.fill: parent
        }
    
        MouseArea {
            anchors.fill: parent
            onClicked: {
                Qt.quit();
            }
        }
    }
    - Late

  5. #5
    Registered User
    Join Date
    May 2009
    Posts
    18

    Re: Using a QML extension plugin on device

    Thanks Late and Seikeau
    I found the problem in my code it has to do with the way I was writing the import sentence.

Similar Threads

  1. Replies: 0
    Last Post: 2007-08-29, 17:26
  2. Replies: 1
    Last Post: 2002-11-27, 05:51

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •