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. Flickable Area not adding both Listview and Items.
Forum Updated to NodeBB v4.3 + New Features

Flickable Area not adding both Listview and Items.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 581 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.
  • B Offline
    B Offline
    basha92
    wrote on last edited by
    #1

    Hi All,

    I am using QtQuick 1.1 .

    I am using Flickable following way

      Flickable {
            id: flickarea
            anchors.top: applicationHeader.bottom
            boundsBehavior: Flickable.StopAtBounds
            width: parent.width
            height: 1000//parent.height-applicationHeader.height
            contentWidth: parent.width
            contentHeight: 1000
            flickableDirection: Flickable.VerticalFlick
            clip: true
    
    
            ListView {
                id:listview
                interactive: true
                width: parent.width
                height: 50 * model.count
    
                model: rootModel.settings.part1
    
                delegate: MenuItemDelegate { title: model.title; pageUrl: model.pageUrl; color: '#FFF' }
            }
    
            Item{
                id:itemairplanemode
                width: parent.width
                height: 45
                anchors.top: listview.bottom
                MenuItemSwitchDelegate {
                    id:airplanemode
                    title: 'Airplane Mode'
                    on : true //rootModel.settings.airplaneMode
                    //                switchcon.onToggleStateOn: rootModel.settings.airplaneMode = switchControl.checked
                }
            }
    
            Item {
                id:itemstealthmode
                width: parent.width
                height: 45
                anchors.top: itemairplanemode.bottom
                MenuItemSwitchDelegate {
                    id:stealthmode
                    title: 'Stealth Mode'
               
    
                }
            }
        }
    

    It is only displaying Listview and not items below them .
    I have put the anchors properly.
    What would be the problem ?

    Thanks in Advance.
    Basha.

    p3c0P 1 Reply Last reply
    0
    • B basha92

      Hi All,

      I am using QtQuick 1.1 .

      I am using Flickable following way

        Flickable {
              id: flickarea
              anchors.top: applicationHeader.bottom
              boundsBehavior: Flickable.StopAtBounds
              width: parent.width
              height: 1000//parent.height-applicationHeader.height
              contentWidth: parent.width
              contentHeight: 1000
              flickableDirection: Flickable.VerticalFlick
              clip: true
      
      
              ListView {
                  id:listview
                  interactive: true
                  width: parent.width
                  height: 50 * model.count
      
                  model: rootModel.settings.part1
      
                  delegate: MenuItemDelegate { title: model.title; pageUrl: model.pageUrl; color: '#FFF' }
              }
      
              Item{
                  id:itemairplanemode
                  width: parent.width
                  height: 45
                  anchors.top: listview.bottom
                  MenuItemSwitchDelegate {
                      id:airplanemode
                      title: 'Airplane Mode'
                      on : true //rootModel.settings.airplaneMode
                      //                switchcon.onToggleStateOn: rootModel.settings.airplaneMode = switchControl.checked
                  }
              }
      
              Item {
                  id:itemstealthmode
                  width: parent.width
                  height: 45
                  anchors.top: itemairplanemode.bottom
                  MenuItemSwitchDelegate {
                      id:stealthmode
                      title: 'Stealth Mode'
                 
      
                  }
              }
          }
      

      It is only displaying Listview and not items below them .
      I have put the anchors properly.
      What would be the problem ?

      Thanks in Advance.
      Basha.

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

      Hi @basha92,
      Perhaps due to height: 50 * model.count the calculated height is greater enough to file the view and affecting the other Items ?

      157

      1 Reply Last reply
      0
      • B Offline
        B Offline
        basha92
        wrote on last edited by
        #3

        Hi,

        I Solved it.
        height was o.k.
        interactive: false

        and made height sufficient for Flickable Item.

        Thanks.
        Basha.

        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