Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt for Android , ListView cannot be updated by Q_Property
QtWS25 Last Chance

Qt for Android , ListView cannot be updated by Q_Property

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 628 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    desperado_43
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved