[Interest] Why is this not working? Assign direct to QML (through setContextProperty) works, as function doesn't.
markg85 at gmail.com
Fri Nov 9 19:36:29 CET 2012
On Fri, Nov 9, 2012 at 2:14 PM, Mark <markg85 at gmail.com> wrote:
> On Fri, Nov 9, 2012 at 3:59 AM, Lincoln Ramsay <a1291762 at 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 reference to `vtable for PathModel'
>> You need to run qmake to regenerate the Makefile because moc didn't run
>> (because the last time qmake ran, the Q_OBJECT macro wasn't there).
>> Interest mailing list
>> Interest at qt-project.org
> Hmm, i thought i did that. Anyway, after cleaning it up (thoroughly
> this time) it does compile, but it still gives "undefined" in QML when
> i call Util.pathModel() as in my initial example.
> The pathmodel.h looks like this now:
> #ifndef PATHMODEL_H
> #define PATHMODEL_H
> #include <QStringListModel>
> class PathModel : public QStringListModel
> explicit PathModel(QObject *parent = 0);
> #endif // PATHMODEL_H
> Any other options i can try?
> Or is this perhaps a QML bug?
Reported this since i'm beginning to think that it's a bug
More information about the Interest