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. How to Create list detail screen ?
Forum Updated to NodeBB v4.3 + New Features

How to Create list detail screen ?

Scheduled Pinned Locked Moved QML and Qt Quick
listviewlismodel
4 Posts 2 Posters 1.2k Views 2 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.
  • S Offline
    S Offline
    shwt.saxena
    wrote on last edited by
    #1

    Hey,

    I have a listview and i have created a detail screen for each list Item, But I am not able to getting the data from listview to detail screen.
    Why? What should i do to get data from per list ITEM to his detail screen?

    p3c0P 1 Reply Last reply
    0
    • S shwt.saxena

      Hey,

      I have a listview and i have created a detail screen for each list Item, But I am not able to getting the data from listview to detail screen.
      Why? What should i do to get data from per list ITEM to his detail screen?

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on last edited by
      #2

      Hi @shwt.saxena
      How do you call Details screen? Can you post some code ?

      157

      S 1 Reply Last reply
      0
      • p3c0P p3c0

        Hi @shwt.saxena
        How do you call Details screen? Can you post some code ?

        S Offline
        S Offline
        shwt.saxena
        wrote on last edited by p3c0
        #3

        @p3c0 yes I have defined some states and adding click event on image

        Image {
                                 id: img_live
                                 width: 50
                                 height: 50
                                 source: (bgimage.state == "DEFAULT")?"images/noimage.jpg":liveview
                                 anchors.horizontalCenter: parent.horizontalCenter
                                 anchors.verticalCenter: parent.verticalCenter
        
                                 MouseArea{
                                    anchors.fill: parent
                                    onClicked :{
                                        listview.state ="GoToDetailView"
        
                                    }
        
                                 }
                             }
        
        p3c0P 1 Reply Last reply
        0
        • S shwt.saxena

          @p3c0 yes I have defined some states and adding click event on image

          Image {
                                   id: img_live
                                   width: 50
                                   height: 50
                                   source: (bgimage.state == "DEFAULT")?"images/noimage.jpg":liveview
                                   anchors.horizontalCenter: parent.horizontalCenter
                                   anchors.verticalCenter: parent.verticalCenter
          
                                   MouseArea{
                                      anchors.fill: parent
                                      onClicked :{
                                          listview.state ="GoToDetailView"
          
                                      }
          
                                   }
                               }
          
          p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on last edited by
          #4

          @shwt.saxena Please format your code before pasting and use ``` (3 backticks) for posting code blocks.
          The code that you posted doesn't show how details screen in invoked. Is it is a Component or a separate QML ? Please post those details.

          157

          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