Results 1 to 20 of 25

Thread: Is it possible to dynamically populate a ListView within a GridView ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to dynamically populate a ListView within a GridView ?

    Quote Originally Posted by rickbsgu View Post
    Should this:

    Q_PROPERTY(QList<ChannelEntry> channels READ channels WRITE setChannels NOTIFY channelsChanged)
    be

    Q_PROPERTY(QList<ChannelEntry *> m_channels READ channels WRITE setChannels NOTIFY channelsChanged)

    ?
    Yes.

    Quote Originally Posted by rickbsgu View Post
    Also, I think all your properties need to point to the 'm_'<variableName>, where you've declared them as such.
    No.

    Quote Originally Posted by andrioli.n View Post
    My GridView is well populated but my ListView remains empty... Even after 2-3 days of trying different approach...

    So what am I missing ? Anyone has a clue, please ?
    Aside from the error spotted by rickbsgu which probably happend when you simplied the code for pasting, and the ever growing channel list which probably has the same cause, this looks quite OK.

    Normally you wouldn't depend on a certain type of model inside a delegate but that is OK as well.

    Is your channels getter function being called?
    Are ChannelEntry {} instance being created?

    Cheers,
    _

  2. The following user says thank you to anda_skoa for this useful post:

    rickbsgu (4th March 2016)

Similar Threads

  1. Replies: 0
    Last Post: 16th October 2015, 16:51
  2. GridView without reflow
    By shaolin in forum Qt Quick
    Replies: 15
    Last Post: 12th May 2014, 14:14
  3. Replies: 7
    Last Post: 9th September 2013, 08:31
  4. Usage of QTableView as gridview
    By ada10 in forum Newbie
    Replies: 7
    Last Post: 9th August 2010, 23:13
  5. Replies: 1
    Last Post: 14th October 2007, 10:09

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.