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. Focus not exclusive trough loader

Focus not exclusive trough loader

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 1.5k 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.
  • M Offline
    M Offline
    Merinas
    wrote on last edited by
    #1

    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.

    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