Qt for Android , ListView cannot be updated by Q_Property
Unsolved
Mobile and Embedded
-
First , I have to say , this property works on MinGW well.But , Listview has no affect on android build.I have a Q_Properyt which holds QList<Object*> type like:
#ifndef WOLISTUPDATE_H #define WOLISTUPDATE_H #include <QObject> class wolistupdate : public QObject { Q_OBJECT Q_PROPERTY(QList<QObject*> wolist READ wolist WRITE setWolist NOTIFY wolistChanged) public: explicit wolistupdate(QObject *parent = 0); QList<QObject*> wolist() const; void setWolist(const QList<QObject*> &wolist); signals: void wolistChanged(); private: QList<QObject*> m_wolist; };
this is cpp side:
#include "wolistupdate.h"
wolistupdate::wolistupdate(QObject *parent) : QObject(parent)
{}
QList<QObject*> wolistupdate::wolist() const
{
return m_wolist;
}void wolistupdate::setWolist(const QList<QObject *> &wolist)
{
if(wolist!=m_wolist)
{
m_wolist=wolist;
emit wolistChanged();
}ı can't find any solution. I don't know which way ı must go.