Public bug reported:

Steps to reproduce

1) Run the following QML:

import QtQuick 2.4
import Ubuntu.Components 1.3

MainView {
    Page {
        ListView {
            anchors.fill: parent
            model: 5
            delegate: ListItem {
                selectMode: true
                Label {
                    anchors.centerIn: parent
                    text: index
                }
            }
        }
    }
}

Expected outcome

 ListView should be in selection mode

Actual outcome

 ListView isn't in selection mode


This can be worked around by setting the property after the component is
complete:

import QtQuick 2.4
import Ubuntu.Components 1.3

MainView {
    Page {
        ListView {
            anchors.fill: parent
            model: 5
            delegate: ListItem {
                Label {
                    anchors.centerIn: parent
                    text: index
                }
                Component.onCompleted: {
                    selectMode = true
                }
            }
        }
    }
}

** Affects: ubuntu-ui-toolkit (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1493882

Title:
  selectMode property isn't obeyed on ListItem if set at component
  creation

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-ui-toolkit/+bug/1493882/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to