Results 1 to 20 of 25

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2016
    Posts
    12
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

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

    First of all, thank you for your answers.

    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)
    ?
    Exact, but as anda_skoa said, it's due to simplification (it's a pointer in my real source code) but doesn't work anyway...

    By the way, in the constructor of my OverviewEntry object :

    Qt Code:
    1. m_overviewList.append(new OverviewEntry("bar", channels));
    To copy to clipboard, switch view to plain text mode 

    my variable channels (QList of ChannelEntry *) contains the right data. And the member m_channels is well filled by the same data.

    All is functionnal until it reached the QML part.

  2. #2
    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 andrioli.n View Post
    Exact, but as anda_skoa said, it's due to simplification (it's a pointer in my real source code) but doesn't work anyway...
    Posting obviously wrong code has the problem of everyone finding the obvious problems.
    Posting working code gives everyone a chance to spot the actual problem.

    So it is a matter of whether you want help finding problems that don't exist or finding problems that you have as well.

    Quote Originally Posted by andrioli.n View Post
    All is functionnal until it reached the QML part.
    Good! Then you can go ahead and try the suggested things to narrow the problem down.

    Cheers,
    _

  3. #3
    Join Date
    Mar 2016
    Posts
    12
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

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

    Quote Originally Posted by anda_skoa View Post
    Posting obviously wrong code has the problem of everyone finding the obvious problems.
    Posting working code gives everyone a chance to spot the actual problem.

    So it is a matter of whether you want help finding problems that don't exist or finding problems that you have as well.
    Thanks for the advice, the posted code wasn't wrong on purpose but due to a typo...

    For trying the suggested things, I don't see any other leads. I checked your suggestions earlier but everything works good in this side of the code. I just can't access my embedded model in my QML. I'm stuck right there...

  4. #4
    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 andrioli.n View Post
    For trying the suggested things, I don't see any other leads.
    I suggested to things to look into in comment #3, but I don't see where you've posted your findings.
    Maybe you can post the again?

    Cheers,
    _

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.