Hi, I've made a library with a couple of QObject-derived classes.

I want to create a qml module to import in QML files (with the unique beta-release of QtDeclarative for Qt 4.6.0).

I've used QML_DECLARE_TYPE and QML_DEFINE_TYPE to export my classes.

myclass.h

Qt Code:
  1. class MYLIBSHARED_EXPORT MyClass : public QObject
  2. {
  3. Q_OBJECT
  4.  
  5. Q_PROPERTY(bool checkable READ isCheckable WRITE setCheckable NOTIFY checkableChanged)
  6.  
  7. // ...
  8. };
  9.  
  10. QML_DECLARE_TYPE(MyClass)
To copy to clipboard, switch view to plain text mode 

myclass.cpp

Qt Code:
  1. #include "myclass.h"
  2.  
  3. // ...
  4.  
  5. QML_DEFINE_TYPE(MyLibrary, 1,0, MyClass, MyClass)
To copy to clipboard, switch view to plain text mode 

mylibrary.pro

Qt Code:
  1. QT += declarative
  2. TEMPLATE = lib
  3. DEFINES += MYLIBSHARED_LIBRARY
  4. HEADERS += myclass.h
  5. SOURCES += myclass.cpp
To copy to clipboard, switch view to plain text mode 

Now i want to link this library in another project and write something like this:

example.qml

Qt Code:
  1. import MyLibrary 1.0
  2.  
  3. MyClass {
  4. }
To copy to clipboard, switch view to plain text mode 

How can i do this?

Thanks!