Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[Solved] Vertical ListView in horizontal ListView



  • I wonder if there are any nice solutions to my problem?

    For example:

    I have a horizontal ListView which contains vertical ListViews, one for each day of the week. There's no problem panning the vertical ListView for one day but I'm not able to pan to another day since it seems that the vertical ListView eats the horizontal panning gestures.

    Any ideas?



  • I was solving the same problem as you and it works for me. Please see "this topic.":http://developer.qt.nokia.com/forums/viewthread/1832/



  • I solved it!

    In my delegate I had:
    @
    ListView { id: view; ... }

    Component {
        id: dayDelegate
    
        Item {
            id: wrapper
            width: parent.width
            height: parent.height
            ...
    

    @

    but I should have used:
    @
    ListView { id: view; ... }

    Component {
        id: dayDelegate
    
        Item {
            id: wrapper
            width: view.width
            height: view.height
            ...
    

    @

    In other words, I have to use the id of the list view and not parent.



  • can you flick now in two directions ( horizontal and vertical)?



  • Yes, it works for me.


Log in to reply