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. ListView inside Column not scrolling
Forum Updated to NodeBB v4.3 + New Features

ListView inside Column not scrolling

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 417 Views
  • 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

    My aim is to create something like:

    1. Static text field
    2. Listview
    3. Static button

    I tried putting all this into Column/ColumnLayout, also anchors. But if I use smth else instead of anchors.fill : parent - ListView stops scrolling.

            ColumnLayout
            {
                anchors.fill: parent
                    TextField {
                            id: lab
                            width:parent.width
                            text: "some"
                        }
    
                  ListView {
                    id: lw
                    //anchors.fill: parent// scroll is working only if put here this - but that is incorect for me.
                    Layout.fillHeight: true;
                    model: comp
                    interactive : true;
                    delegate: contactDelegate
                    focus: true
                }
    
                Button {
                     id: but
                     text: "Add"
                     width: 40
                     height: 20
                     onClicked: {
                         comp.append({name: "Some long interesting text", number: comp.rowCount()});
                     }
             }
        }
    

    Also I tried using footers and headers - that was better, but they are overlapped with scrolling content (boundsBehavior: Flickable.StopAtBounds not working).

    Please give some advice on implementation, or smth.

    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