08-21-2013 07:32 AM
I was wondering if it is possible to have a drop down menu on a page with various different selections, and when clicked it would show a specific listview for that selection. I want to have different listviews show up depending on what category the user chooses in the drop down menu. I've searched on here and on the developer forums, but I can't seem to get any info on this, that or maybe I'm using the wrong search terms
Thanks in advance!
08-21-2013 07:54 AM
08-21-2013 08:11 AM
08-21-2013 08:16 AM
08-21-2013 08:17 AM
08-21-2013 08:34 AM
It sounds like you want to filter the ListView, if I understand your example there are several ways of achieving this;
1) Have a configurable ListView using ComponantDefinition
2) Create your own ListView with a custom datamodel
3) Create Multiple ListViews that hide/show depending on the dropdown (worst option)
The complexity obviously determines which of option 1 or 2 works best for you.
Your dropbox would then set the filter property within the ListView.
08-21-2013 08:45 AM - edited 08-21-2013 08:45 AM
I think you're right! Totally forgot about using filters. Thanks. Will let you know if it works for me and click accept solution if it does.
08-23-2013 11:59 AM
BBSJdev: Is it possible to implement the filter within QML? or do I have to do a whole process of manually implementing the parameters in C++? I'm using persisentobjects data model and the categories are pre-defined but saved as a child, NOT a header.
If it does require implementation within C++ do I include it as it's on Q_invokable function or just add the code to the existing datamodel?
I'm sorry if these questions may not make sense, I only have basic experience coding and I've been building this application and I'm basically done, just thought it would look nice if I could filter the items based on category, but if it's too difficult I will just save this feature for my next update.
thanks in advance.