Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Using namespace in QML
Forum Updated to NodeBB v4.3 + New Features

Using namespace in QML

Scheduled Pinned Locked Moved Solved QML and Qt Quick
3 Posts 2 Posters 915 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Praveen kk
    wrote on last edited by
    #1

    Hi all, Anybody know how to do this ?

    I have a class which is derived from QQuickPaintedItem, which i used in my QML side for my custom drawing. Say MyGraphicScene.
    and i have another class say BaseShape which is derived from QObject, and have a 'has a' relation ship with my MyGraphicScene class.
    I my case all these class are under the namesapce called MyyApp::MyGraphicApp

    namespace MyyApp
    {
    namesapce MyGraphicApp
    {
    class MyGraphicScene: public QQuickPaintedItem
    {......
    BaseShape* pShape;
    };
    }
    }

    so when i compile this, its fine, but during runtime, my plugin library could not be loaded beacuse of the undefined symbol error, when i remove the name space, everything works fine...
    Can anybody tell me why namespace is not recognize in QML, any solution please, I should go with name space anyway,

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by
      #2

      How do you register the type in QML?

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      P 1 Reply Last reply
      0
      • VRoninV VRonin

        How do you register the type in QML?

        P Offline
        P Offline
        Praveen kk
        wrote on last edited by
        #3

        @Praveen-kk said:

        BaseShape

        I have registerd both BaseShape and MyGraphicScene class using qmlRegisterType<>()
        Only problem when using the name space.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved