[SailfishDevel] SilicaListView searchfield looses focus on search
Lukáš Karas
lukas.karas at centrum.cz
Mon Mar 12 11:28:29 UTC 2018
Try to setup `currentIndex` of `SilicaListView` to -1 explicitly...
From my experience, when model of list view is updated, first delegated item
steal focus from search field and keyboard is hidden...
```
SilicaListView {
id: listView
model:listModel.proxyModel
anchors.fill: parent
currentIndex: -1 // otherwise currentItem will steal focus
// ...
}
```
Lukas
Dne pondělí 12. března 2018 12:11:10 CET Jesper Schmitz Mouridsen napsal(a):
> Hi list.
>
> I'm making a searchable (play)list for vlc-remote's playlist
> https://github.com/jsm222/harbour-vlc-remote/tree/cpp-playlist
>
> At the moment I'm using a timer to regain focus on the SearchField in
> the header, since it looses focus on every single char input. (After the
> search result)
>
> The proxy model does not have a filteredDone or similar event AFAICT
>
> https://github.com/jsm222/harbour-vlc-remote/blob/cpp-playlist/src/playlistm
> odel.cpp
> https://github.com/jsm222/harbour-vlc-remote/blob/14c91cc85bcd1a24c1978135a
> 805d19a98be03b8/qml/pages/VlcPlaylist.qml#L34
>
>
> Other native apps on sailfish does not have this behaviour. Media player
> or email search
> Is this a bug, or am I doing something wrong?
>
>
>
> Regards
>
> /Jesper
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to devel-unsubscribe at lists.sailfishos.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20180312/07ffbf32/attachment.sig>
More information about the Devel
mailing list