Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML ListView index and current item
Qt 6.11 is out! See what's new in the release blog

QML ListView index and current item

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 3.4k Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Sorry if my post is unclear if it is please let me know i am new to Qt Quick

    I have 2 ListViews

    ListView1 = image based list Horizontal that contains root items from my model

    model is as follows
    @
    <Model>
    <Menu>
    <Item Image="1a46ba4ab74cb4135499cefb5448c292.png" Source="http://www.telusmobility.com/en/ON/promotions/blitz.shtml" Name="Telus">
    <SubItem Source="http://www.telusmobility.com/en/ON/smartphones/index.shtml" Name=" Smartphones"/>
    <SubItem Source="http://www.telusmobility.com/en/ON/clear_choice_voice_data/index.shtml" Name=" Rate Plans"/>
    <SubItem Source="http://www.telusmobility.com/en/ON/canada_travel/index.shtml" Name=" Coverage"/>
    <SubItem Source="http://www.telusmobility.com/en/ON/client_help/index.shtml" Name=" Support"/>
    <SubItem Source="http://www.telusmobility.com/en/ON/plans/student40.shtml?INTCMP=student_plan" Name=" Promotions"/>
    </Item>
    <Item Image="cf7ef82f8cd8d49c7b20be75962d8dc7.png" Name="Dine.To"/>
    <Item Image="dfc380961143473366a8738f3ed11444.png" Name="TourismTo"/>
    <Item Image="74c33693310631dc96a4c0360bfe2d62.png" Name="Shopping">
    <SubItem Name=" Store 1"/>
    <SubItem Name=" Store 2"/>
    <SubItem Name=" Store 3"/>
    <SubItem Name=" Store 4"/>
    </Item>
    <Item Image="82749b02b055adf6aa429cbccefe83e2.png" Source="http://rss.cbc.ca/lineup/canada.xml" Name="News">
    <SubItem Source="http://rss.cbc.ca/lineup/canada.xml" Name=" Canada"/>
    <SubItem Source="http://rss.cbc.ca/lineup/politics.xml" Name=" Politics"/>
    <SubItem Source="http://rss.cbc.ca/lineup/sports-soccer.xml" Name=" Soccer"/>
    </Item>
    <Item Image="c9c8bf6489d94a450b4f845b470ce2b0.png" Source="http://weather.yahooapis.com/forecastrss?w=2502265" Name="Weather"/>
    <Item Image="6ac44fe4974f6305c6a806721f33e4a9.png" Name="Hotels">
    <SubItem Name=" Holiday Inn"/>
    <SubItem Name=" Hilton"/>
    </Item>
    </Menu>
    </Model>
    @
    root items are Model/Menu/Item/Name

    now i have a Vertical ListView

    so the way i need it to go is when i click on an item from the Horizontal list (image)(Model/Menu/Item/Name) it will get the source and insert that into WebView URL and if the Item has SubItems get the subitems (Model/Menu/Item/SubItem/ Name) and display the subitems in the Vertical ListView

    How can i get something like this accomplished i have read many articles online and gone threw a number of tags: "ListView" on Qt-Project and have not turned up a lot on what i am trying to accomplish...

    Any help is very much appreciated

    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