=== JanC is now known as Guest89378 | ||
=== JanC_ is now known as JanC | ||
=== dandrader_ is now known as dandrader | ||
mterry | dandrader, you commented on the greeter-focus branch about focus being set by Qt. That surprises me... I would have assumed Qt would change activeFocus, but why does it change focus? | 15:01 |
---|---|---|
dandrader | mterry, because there can be only *one* item with focus=true on the same focus scope | 15:02 |
dandrader | mterry, it's like a check box. you cannot check more than one square in the same group :) | 15:03 |
dandrader | mterry, which makes focus a "special" property in QML | 15:03 |
mterry | dandrader, OK makes sense... thanks | 15:04 |
mterry | dandrader, so looking at that file, the root item is a focusscope. And we're switching focus (and visibility) between two children items. Based on what you said above, I'm not sure how to fix the focus to be sensible. I could add a focusscope per child item? But that seems like a lot of focusscopes, and I'm not sure that does what I want anyway. I guess I do the imperative way | 15:24 |
dandrader | mterry, you can also find who's getting/stealing the focus | 15:25 |
dandrader | mterry, by adding a ActiveFocusLogger{} element and seeing the console output | 15:25 |
mterry | dandrader, I know who. The GreeterPrompt item is pretty simple. It's a FocusScope with two children, one of whom always has focus | 15:25 |
mterry | dandrader, I was trying to be declarative about the focus, but it seems to get lost when switching between the two of them | 15:26 |
dandrader | mterry, so if you know and have full control over who gets focus in this focus scope, you shoulnd't suffer from focus changing under your feet | 15:27 |
mterry | But maybe I only think I know what's happening | 15:27 |
dandrader | mterry, if you set focus to one item, the other will receive an assigment to false from Qt | 15:28 |
dandrader | mterry, so any binding on that other item will be lost | 15:28 |
mterry | dandrader, ok I guess that's what's happening | 15:29 |
mterry | dandrader, so there's no way to be declarative about it? | 15:29 |
dandrader | mterry, see how ApplicationWindow does it | 15:29 |
dandrader | mterry, it also switches focus among its children | 15:30 |
mterry | Yeah, imperatively | 15:30 |
mterry | OK. I can do imperative easily | 15:30 |
mterry | I was just trying to be elegant | 15:30 |
dandrader | mterry, yep | 15:30 |
mterry | dandrader, updated. thanks! | 15:34 |
=== dandrader is now known as dandrader|afk | ||
=== dandrader|afk is now known as dandrader | ||
=== dpm is now known as dpm-afk |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!