Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-11 Thread Mark
On Sat, Nov 10, 2012 at 11:35 PM, Robert Voinea rvoi...@gmail.com wrote: Hi On Saturday 10 November 2012 20:05:13 Mark wrote: On Sat, Nov 10, 2012 at 8:03 PM, Robert Voinea rvoi...@gmail.com wrote: I am not saying to instantiate it as QObject, but expose it to qml as qobject.

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-10 Thread Robert Voinea
Hi On Saturday 10 November 2012 20:05:13 Mark wrote: On Sat, Nov 10, 2012 at 8:03 PM, Robert Voinea rvoi...@gmail.com wrote: I am not saying to instantiate it as QObject, but expose it to qml as qobject. I'm sorry that my replies are so short... but i'm writing from my phone. As

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-09 Thread Mark
On Fri, Nov 9, 2012 at 3:59 AM, Lincoln Ramsay a1291...@gmail.com wrote: On 09/11/12 12:56, Mark wrote: Ahh, i was really hoping for that to work! Sadly i was welcomed with this compiler error: pathmodel.o: In function `PathModel::PathModel(QObject*)': pathmodel.cpp:(.text+0x14): undefined

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-09 Thread Mark
On Fri, Nov 9, 2012 at 2:14 PM, Mark mark...@gmail.com wrote: On Fri, Nov 9, 2012 at 3:59 AM, Lincoln Ramsay a1291...@gmail.com wrote: On 09/11/12 12:56, Mark wrote: Ahh, i was really hoping for that to work! Sadly i was welcomed with this compiler error: pathmodel.o: In function

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-08 Thread Alan Ezust
On Thu, Nov 8, 2012 at 1:19 PM, Mark mark...@gmail.com wrote: Note: i cannot do qRegisterMetaType on the PathModel since it's class that inherits from a class that forbids copying the data (copy constructor stuff). qmlRegisterType can register classes derived from QObject. Although you're

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-08 Thread Mark
On Fri, Nov 9, 2012 at 1:01 AM, Alan Ezust alan.ez...@gmail.com wrote: On Thu, Nov 8, 2012 at 1:19 PM, Mark mark...@gmail.com wrote: Note: i cannot do qRegisterMetaType on the PathModel since it's class that inherits from a class that forbids copying the data (copy constructor stuff).

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-08 Thread Tony Rietwyk
Sent: Friday, 9 November 2012 8:19 AM Hi, Lets take this (pseudo code) as example. I made a custom QStringListModel class and calles it PathModel: pathmodel.h class PathModel : public QStringListModel { public: explicit PathModel(QObject *parent = 0); }; Then i made a custom

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-08 Thread Mark
On Fri, Nov 9, 2012 at 3:36 AM, Tony Rietwyk t...@rightsoft.com.au wrote: Sent: Friday, 9 November 2012 8:19 AM Hi, Lets take this (pseudo code) as example. I made a custom QStringListModel class and calles it PathModel: pathmodel.h class PathModel : public QStringListModel { public:

Re: [Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.

2012-11-08 Thread Lincoln Ramsay
On 09/11/12 12:56, Mark wrote: Ahh, i was really hoping for that to work! Sadly i was welcomed with this compiler error: pathmodel.o: In function `PathModel::PathModel(QObject*)': pathmodel.cpp:(.text+0x14): undefined reference to `vtable for PathModel' You need to run qmake to regenerate