Hi ,
I don't know if ı open topic in right place.I am developing an Android apps with qt . First I try it on MinGW. I have a listview which bind with Q_Property.My code is work in MinGW but there is no affect on Android. MY code :
#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:
QList<QObject*> wolist() const;
void setWolist(const QList<QObject*> &wolist);
signals:
void wolistChanged();
private:
QList<QObject*> m_wolist;
};
#endif // WOLISTUPDATE_H
#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:
wolistupdate(QObject *parent = 0);
QList<QObject*> wolist() const;
void setWolist(const QList<QObject*> &wolist);
signals:
void wolistChanged();
private:
QList<QObject*> m_wolist;
};
#endif // WOLISTUPDATE_H
To copy to clipboard, switch view to plain text mode
#include "wolistupdate.h"
{
}
QList<QObject*> wolistupdate::wolist() const
{
return m_wolist;
}
void wolistupdate::setWolist(const QList<QObject *> &wolist)
{
if(wolist!=m_wolist)
{
m_wolist=wolist;
emit wolistChanged();
}
}
#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();
}
}
To copy to clipboard, switch view to plain text mode
What is the solution. Thanks you
Bookmarks