Forums

OverviewFelgo 2 Support (Qt 5) › Emit AppListView showSearch signal as typing

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23593

    Edward

    Hey Guys,

    I’ve set up the ‘showSearch: true’ with a couple of AppListView’s within my app, combining them with RegExpFilters from my JsonListModel – when testing on iOS devices, the signal seems to fire every time I press a key (So if i press ‘e’, all first names which begin with ‘e’ are immediately shown, and this continues to filter the list as I type more letters; However, when testing on android, no signal is omitted until I manually hit return, meaning the search filter is only applied after I’ve hit enter.

     

    Is there a way I can access the internal properties of the AppListView search bar to send the signal when the textInputs length is changed? So I can continually update the search as the user types on both android and iOS?

     

    https://felgo.com/doc/felgo-applistview/#showSearch-prop

    #23595

    Alex
    Felgo Team

    Hi,

    the issue is related to the text composing feature of the Android keyboard (like dictionary features). With those active, the currently composed word will not be part of the text property until accepted. Instead, you need to make use of the displayText property.

    You can easy set a custom SearchBar as the header item of your AppListView and listen to changes of that property, like this:

              AppListView {
                header: SearchBar {
                  // connect to the internal TextField
                  textField.onDisplayTextChanged: {
                    // perform your search here
                    console.debug("Changed " + textField.displayText)
                  }
                }
              }

    Best,
    Alex

    #23600

    Edward

    Amazing this works as intended on both iOS and android, however when pressing the first letter the keyboard looses focus and i have to reselect the seachbar to continue typing, this only happens on the first letter press?

Viewing 3 posts - 1 through 3 (of 3 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support