Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9133271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:27:27+00:00 2026-06-17T08:27:27+00:00

I have ListVIew that is filled with hard-coded DataModel . Then I want to

  • 0

I have ListVIew that is filled with hard-coded DataModel. Then I want to create DropDown menu that contains the dataModel header.

When I select the DropDown option, I want ListView to only show the items for the selected header.

So, my questions are:

  1. How can I do this in QML?

  2. Is there any way to populate the DropDown's Option with the data model?

Below is my application’s structure:

 Page{
     Container{
         DropDown{} //onSelectedValueChanged, I want the ListView filtered
         ListView{
              dataModel: XmlDataModel{...}
              listItemComponents: [...]
         }
     }
 }

Thanks before

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T08:27:28+00:00Added an answer on June 17, 2026 at 8:27 am

    I asked the question in Blackberry support forum and got the answer:

    If we follow the documentation, we know that dataModel looks like this:

    <root>
        <header> ... </header>
        <header> ... </header>
        <header> ... </header>
    </root>
    

    Then we change the rootIndexPath to the index of the header. So only the child of that header is shown. The index is in array integer type

    myListView.rootIndexPath = [0] //Show all child of first header
    myListView.rootIndexPath = [1] //Show all child of second header
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a listview that contains log messages. I want to set the background
I have a listview (in Details view) that is filled dynamically. I want to
My vision is to create a color coded listView, where I want to have
I have a ListView that contains 1 image+2 texts + 1 image on a
I have a ListView that contains playlists. If the user wants to edit an
I have a ListView that is filled by an ObservableCollection<MenuTrayItem> . In my resources
I have a 2X2 Grid that is filled with 2 Listview controls and some
I have a sortable listview that gets filled with a live data as it
I have a listview that I want to add event listener to it. The
I have a ListView that is filled with a dynamic set of data each

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.