[Interest] Keyboard navigation in QtQuick.Controls ScrollView?

Ola Røer Thorsen ola at silentwings.no
Wed Sep 25 14:50:35 CEST 2013


Hi Jens,

thanks for the explanation! Setting interactive to true solved for me (the
target platform has no mouse or touch anyway).

Best regards,
Ola



2013/9/25 Bache-Wiig Jens <Jens.Bache-Wiig at digia.com>

>
>  On Sep 24, 2013, at 9:53 AM, Ola Røer Thorsen <ola at silentwings.no> wrote:
>
>  Hi,
>
>  I can't seem to get keyboard navigation working when I embed a ListView
> in a ScrollView
>
>  ScrollView {
>    ListView {
>       ...
>    }
> }
>
>  just like in the documentation. I've tried enabling focus on both, or
> just one, and so on. Keyboard navigation works fine on the ListView when
> used without the ScrollView. Any hints on how to make this work?
>
>
>  The issue is that the ScrollView intentionally sets the interactive flag
> to false on the ListView in order to disable flicking as that is not what
> you would expect when scroll bars are available.
>
>  However, due to pending QTBUG-17051<https://bugreports.qt-project.org/browse/QTBUG-17051> this
> will also disable the built-in keyboard navigation.
>
>  There are three possible work arounds to this issue though. One is to
> explicitly set flickableItem.interactive:true on the the ScrollView, which
> would re-enable _both_ flicking and keyboard. The other is to handle the
> interaction yourself by connecting Keys.onUpPressed to list
> view.decrementCurrentIndex() etc. The third is to use TableView instead of
> ListView that should already have keyboard interaction available.
>
>  Regards,
> Jens
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20130925/bb9a45f1/attachment.html>


More information about the Interest mailing list