Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My QML app uses an OptionSelector to allow users to choose from a list of items. On tablet size, I have it set to keep it expanded. However, I limit the container height, and while it's expanded, it cannot be scrolled. Is there a way to let it expand without blocking scrolling?

Code:

OptionSelector {
    id: projectSelector
    property int projectIndex: 0
    width: pageLayout.width
    model: projects.count > 0 ? projects : emptyList

    containerHeight: pageLayout.height - itemHeight - units.gu(3)
    expanded: true
}
share|improve this question
1  
Could you please attach the relevant part of your code to your question? –  Sylvain Pineau Apr 14 at 15:33

1 Answer 1

Setting OptionSelector.currentlyExpanded instead of OptionSelector.expanded makes it expanded initially, but as soon as you select an option, it collapses. This is closer to what I want, but not the most optimal solution.

OptionSelector {
    id: projectSelector
    property int projectIndex: 0
    width: pageLayout.width
    model: projects.count > 0 ? projects : emptyList

    containerHeight: pageLayout.height - itemHeight - units.gu(3)
    currentlyExpanded: true
}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.