Re: [Interest] metaObject from class name

2014-02-14 Thread Thiago Macieira
Em sex 14 fev 2014, às 10:50:38, Graham Labdon escreveu: > Hi > In my application I have a class name as a string > This is the name of a class derived from QObject. > Now what I would like to do is the get metaObject for this class from the > string > > Is this at all possible? Yes, sure. Just

Re: [Interest] metaObject from class name

2014-02-14 Thread Stephen Kelly
On Friday, February 14, 2014 10:02:29 you wrote: > > QMetaType::metaObjectForType is not documented. > > > > http://qt-project.org/doc/qt-5/qmetatype.html#metaObjectForType Ok then, it is documented :). My grep was wrong. > It was introduced in Qt 5.0. Yes. I wrote it. Thanks, -- Stephen Ke

Re: [Interest] metaObject from class name

2014-02-14 Thread Keith Gardner
> > QMetaType::metaObjectForType is not documented. > > http://qt-project.org/doc/qt-5/qmetatype.html#metaObjectForType It was introduced in Qt 5.0. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest

Re: [Interest] metaObject from class name

2014-02-14 Thread Stephen Kelly
On Friday, February 14, 2014 09:21:20 Keith Gardner wrote: > class Foo : public QObject > { > ... > }; > Q_DECLARE_METATYPE(Foo*) This is not needed. > > const char *string = "Foo"; > const QMetaObject* metaObject = > QMetaType::metaObjectForType(QMetaType::type(string)); > > I haven't tri

Re: [Interest] metaObject from class name

2014-02-14 Thread Graham Labdon
Ok Thanks From: Keith Gardner [mailto:kreios4...@gmail.com] Sent: 14 February 2014 15:21 To: Jason H Cc: Graham Labdon; interest@qt-project.org Subject: Re: [Interest] metaObject from class name If you register the class with QMetaType with Q_DECLARE_METATYPE(Class*), you can then call

Re: [Interest] metaObject from class name

2014-02-14 Thread Keith Gardner
" design pattern. > > Here is an example: > > http://www.ics.com/designpatterns/solutions/abstractfactory.html#abstractfactoryh > > > -- > *From:* Graham Labdon > *To:* "interest@qt-project.org" > *Sent:* Friday, February 14,

Re: [Interest] metaObject from class name

2014-02-14 Thread Jason H
n example: http://www.ics.com/designpatterns/solutions/abstractfactory.html#abstractfactoryh From: Graham Labdon To: "interest@qt-project.org" Sent: Friday, February 14, 2014 5:50 AM Subject: [Interest] metaObject from class name Hi In my application

Re: [Interest] metaObject from class name

2014-02-14 Thread Mandeep Sandhu
On Fri, Feb 14, 2014 at 4:20 PM, Graham Labdon < graham.lab...@avalonsciences.com> wrote: > > Hi > In my application I have a class name as a string > This is the name of a class derived from QObject. > Now what I would like to do is the get metaObject for this class from the > string > > Is this

[Interest] metaObject from class name

2014-02-14 Thread Graham Labdon
Hi In my application I have a class name as a string This is the name of a class derived from QObject. Now what I would like to do is the get metaObject for this class from the string Is this at all possible? Many thanks ___ Interest mailing list Inte