Focus not exclusive trough loader



  • Hi,

    I'm playing with MouseArea focus and it seems that focus are not exclusive trough a Loader element see the code below. Did I miss something or is it not possible ?

    @import QtQuick 1.0

    Rectangle {
    width: 360
    height: 360

    Component{
        id:delegate
        Rectangle{
            width: 100
            height: 100
            color: ma.focus?"green":"red"
            MouseArea{
                id:ma
                anchors.fill: parent
                onPressed: focus=true
            }
        }
    }
    
    FocusScope{
        anchors.fill: parent
    
    
        Row{
            spacing: 10
            Loader{
                sourceComponent: delegate
            }
            Loader{
                sourceComponent: delegate
            }
        }
    }
    

    }@

    Thank for reading this.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.