Listview and focus problem



  • I've got two differenciate areas.

    On one hand, I've got a Listview where each line has a text (line_text). On the other hand I've got a text (my_text) that is set by using the custom_keyboard I made, and an accept button.
    I succeded in setting my_text using the custom_keyboard.

    The problem is that I also want to get focus on a line of the listview by clicking it, so that when I press accept_button my_text is copied into the line_text of the focused line.

    Here's a summary of the relevant parts of my code:

    @Rectangle {
    ...
    Rectangle {
    Listview {
    Delegate {
    Rectangle {
    id: line
    Row {
    ...
    Row {
    Text {
    id: line_text
    }
    }
    }
    }
    }
    }
    }

    Item {
    Rectangle {
    Text {
    id: my_text
    }
    }

    Rectangle {
      id: custom_keyboard
      ...
    }
    
    Rectangle {
      id: accept_button
      ...
      MouseArea {
          ...
      }
    }
    

    }
    }
    @

    Thank you



  • Hi,

    The following threads will hopefully give you some ideas of where you might start:

    Regards,
    Michael



  • Ok, Thank you. I'll have a look at it


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.