×

Discussion Board

Page 1 of 2 12 LastLast
Results 1 to 15 of 23
  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Using QtMobiltiy and Symbian.systeminfo (native lib).

    Hello Devs,

    I am facing an issue while trying to develop using Qt/QML.
    I am creating apps for native Symbian. I can use the properties within Symbian.systeminfo. however when I try to use elements within QtMobility, I get error during runtime "Element could not be created". The same element works if I create apps for open platform.

    Regards,

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Atleast i am able to use QtMobility systeminfo QML elements to get the device info etc, on symbian devices.

    Can you be more specific on what exactly is not working for you.. or please share a small code snippet.

  3. #3
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Can you create an example which uses QML Element: Button (Native symbian) and QML Element: NetworkInfo (QtMobility)?

    This is what I did:
    - Create a Qt Quick project.
    - Select Native symbian
    - .pro file has these config:
    CONFIG += mobility
    MOBILITY += systeminfo
    CONFIG += qt-components
    - .qml has the following import:
    import QtQuick 1.1
    import Qt 4.7
    import QtMobility.systeminfo 1.1 // for calling NetworkInfo QML Element
    import com.nokia.symbian 1.1 // for calling Button (Native Symbian)

    - Use the code (copy from google any example):
    Button {
    ....
    ....
    }
    NetoworkInfo {
    ....
    ....
    }

    Try to build and execute.

    At runtime I get an error: Element could not be created {@NetowrkInfo}

    Any idea? Really appreciate your help!!

  4. #4
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Check whether the plugin available in \QtSDK\Symbian\SDKs\Symbian3Qt474\epoc32\data\z\resource\qt\imports\QtMobility for symbian?

    You don't need to use import Qt 4.7 instead of import QtQuick 1.1 is fine.

  5. #5
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    I think you miss understood me.

    .pro having:
    CONFIG += mobility
    MOBILITY += systeminfo

    alows me to use:
    NetoworkInfo {
    ....
    ....
    }

    Now, if I create a new project:
    .pro having:
    CONFIG += qt-components

    allows me to create:
    Button {
    ....
    ....
    }

    -----------------

    In short I can create individual projects having either native symbian or Qtmobiltiy works. If I use them together it does not. Can any of you try 1 such example and let me know?

  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Hi,

    yes, i could reproduce the error with the info shared.
    I am checking for the solution.

    But to confirm i need setup, can you check meanwhile -

    can you please add this line to pro file and check -

    DEFINES += NETWORKACCESS

    Edit: added extra caps and the above, no it didnt work.
    Last edited by kusumk; 2012-03-07 at 06:56. Reason: updated details after testing

  7. #7
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    At least this is working fine for me.
    Page {
    id: myPage
    NetworkInfo{
    id: netStatus
    }
    Button{
    anchors.centerIn: parent
    text: "HELLO"
    onClicked: {
    console.log ("netStatus.networkStatus : " + netStatus.networkStatus)
    }
    }
    }

  8. #8
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    have u added the required capabilities?

  9. #9
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Great!! Can you paste the .pro file as well? Did you add any other lib or any settings? This info can be helpful to others as well! Again, thanks a lot kkrish for taking time !

  10. #10
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Quote Originally Posted by kkrish View Post
    have u added the required capabilities?


    Can you tell us which capabilities you added?

  11. #11
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Just modify the existing pro file automatically created by qtcreator.

    # Add more folders to ship with the application, here
    folder_01.source = qml/smsreader
    folder_01.target = qml
    DEPLOYMENTFOLDERS = folder_01

    # Additional import path used to resolve QML modules in Creator's code model
    QML_IMPORT_PATH =

    symbian:TARGET.UID3 = 0xE12FFAD6

    # Smart Installer package's UID
    # This UID is from the protected range and therefore the package will
    # fail to install if self-signed. By default qmake uses the unprotected
    # range value if unprotected UID is defined for the application and
    # 0x2002CCCF value if protected UID is given to the application
    #symbianEPLOYMENT.installer_header = 0x2002CCCF

    # Allow network access on Symbian
    CONFIG += mobility
    MOBILITY += systeminfo
    MOBILITY = messaging
    symbian:TARGET.CAPABILITY = NetworkServices \
    LocalServices \
    ReadUserData \
    WriteUserData \
    UserEnvironment \
    ReadDeviceData \
    WriteDeviceData

    # If your application uses the Qt Mobility libraries, uncomment the following
    # lines and add the respective components to the MOBILITY variable.
    # CONFIG += mobility
    # MOBILITY +=

    # Speed up launching on MeeGo/Harmattan when using applauncherd daemon
    # CONFIG += qdeclarative-boostable

    # Add dependency to Symbian components
    CONFIG += qt-components

    # The .cpp file which was generated for your project. Feel free to hack it.
    SOURCES += main.cpp

    # Please do not modify the following two lines. Required for deployment.
    include(qmlapplicationviewer/qmlapplicationviewer.pri)
    qtcAddDeployment()

  12. #12
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    I still get the same error:

    Element is not creatable.
    NetworkInfo{
    ^


    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    .qml source:

    import QtQuick 1.1
    import QtMobility.systeminfo 1.1
    import com.nokia.symbian 1.1

    Page {
    id: mainPage

    NetworkInfo{
    id: netStatus
    }

    Button {
    id: btnNetwork
    x: 87
    y: 175
    width: 187
    height: 37
    text: "Network Details"

    onClicked: {
    console.log ("netStatus.networkStatus : " + netStatus.networkStatus)
    }
    }
    }

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    .pro source:

    # Add more folders to ship with the application, here
    folder_01.source = qml/QtMob_001
    folder_01.target = qml
    DEPLOYMENTFOLDERS = folder_01

    # Additional import path used to resolve QML modules in Creator's code model
    QML_IMPORT_PATH =

    symbian:TARGET.UID3 = 0xE7D24041

    # Smart Installer package's UID
    # This UID is from the protected range and therefore the package will
    # fail to install if self-signed. By default qmake uses the unprotected
    # range value if unprotected UID is defined for the application and
    # 0x2002CCCF value if protected UID is given to the application
    #symbianEPLOYMENT.installer_header = 0x2002CCCF

    # Allow network access on Symbian
    symbian:TARGET.CAPABILITY += NetworkServices \
    LocalServices \
    ReadUserData \
    WriteUserData \
    UserEnvironment \
    ReadDeviceData \
    WriteDeviceData

    # If your application uses the Qt Mobility libraries, uncomment the following
    # lines and add the respective components to the MOBILITY variable.
    CONFIG += mobility
    MOBILITY += systeminfo

    # Speed up launching on MeeGo/Harmattan when using applauncherd daemon
    # CONFIG += qdeclarative-boostable

    # Add dependency to Symbian components
    CONFIG += qt-components

    # The .cpp file which was generated for your project. Feel free to hack it.
    SOURCES += main.cpp

    # Please do not modify the following two lines. Required for deployment.
    include(qmlapplicationviewer/qmlapplicationviewer.pri)
    qtcAddDeployment()

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------



  13. #13
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    @Kkrish,

    Any help/input/update ?

  14. #14
    Super Contributor
    Join Date
    Jun 2006
    Location
    India
    Posts
    3,037

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Hi,

    I m sure you do not have the qtmobility systeminfo package. better to download QtSdk 1.2 .
    As I said in #4, have you seen what all packages available ?

  15. #15
    Registered User
    Join Date
    Mar 2012
    Posts
    13

    Re: Using QtMobiltiy and Symbian.systeminfo (native lib).

    Kkrish,

    I have them. I have the latest QT SDK from nokia. I can run individual projects and run NetworkInfo QML element and Button element seperately. If I combine the code, it won't run!

Page 1 of 2 12 LastLast

Similar Threads

  1. aptana调试一个Widget 总是报未知插件 application/x-systeminfo-widget这个错误,
    By kevinweijun in forum Web Technologies and Multimedia Content- Web 技术和多媒体内容
    Replies: 3
    Last Post: 2011-02-18, 02:28
  2. Qt Mobility missing libqtm-systeminfo
    By Sasler in forum Nokia N9
    Replies: 3
    Last Post: 2010-06-30, 11:43
  3. Undefined values with SystemInfo Service API (WRT 1.0)
    By jappit in forum Symbian Web Runtime
    Replies: 2
    Last Post: 2010-04-19, 12:29
  4. SystemInfo Service API
    By shankx in forum Symbian Web Runtime
    Replies: 3
    Last Post: 2009-09-14, 08:50

Posting Permissions

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