[Qt-qml] Any one knows how to write a qmldesigner plugin?
Chen, Zhang Z
zhang.z.chen at intel.com
Wed Jul 21 11:41:14 CEST 2010
The qtCreator version is 2.0.0-beta1.
-----Original Message-----
From: qt-qml-bounces at trolltech.com [mailto:qt-qml-bounces at trolltech.com] On Behalf Of Kai Koehne
Sent: Wednesday, July 21, 2010 5:35 PM
To: qt-qml at trolltech.com
Subject: Re: [Qt-qml] Any one knows how to write a qmldesigner plugin?
On 7/21/2010 10:25 AM, ext Chen, Zhang Z wrote:
> Kai,
>
> What about QGraphicsWidget? There seems no visual editor for it.
> Besides, it is not clear on how to add a new sub class QDelarativeItem to item library. I tried the following:
> I. in myplugin.cpp:
> qmlRegisterType<QDeclarativeItem>("test_mtf_plugin",1,0,"QDeclarativeItem");
>
> 2. in .metainfo
> metainfo>
> <node name="test_mtf_plugin/QDeclarativeItem" showInItemLibrary="true" category="Bauhaus - Basic" isContainer="true" icon=":/fxplugin/images/item-icon.png">
> <inherits name="Qt/Item" />
> <propertyDefaultValue name="width" type="int" defaultValue="600"/>
> <propertyDefaultValue name="height" type="int" defaultValue="400"/>
> <itemlibraryrepresentation name="MTF Item" icon=":/fxplugin/images/item-icon.png">
> <property name="width" type="int" value="200"/>
> <property name="height" type="int" value="200"/>
> </itemlibraryrepresentation>
> </node>
> </metainfo>
Which version of Creator is this? The syntax of the metainfo stuff has
changed quite a bit in both 2.0 and master ...
Regards
Kai
--
Kai Koehne
Software Engineer
Nokia, Qt Development Frameworks
Nokia gate5 GmbH
Firmensitz: Invalidenstr. 117, 10115 Berlin, Germany
Registergericht: Amtsgericht Charlottenburg, Berlin: HRB 106443 B
Umsatzsteueridentifikationsnummer: DE 812 845 193
Geschäftsführer: Dr. Michael Halbherr, Karim Tähtivuori
_______________________________________________
Qt-qml mailing list
Qt-qml at trolltech.com
http://lists.trolltech.com/mailman/listinfo/qt-qml
More information about the Qt-qml
mailing list