×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Oct 2011
    Posts
    76

    Question Listview Item/Data Search

    hi m8,

    i want to search items/datas at the listview. how can i do this? i am using listmodel and i called it in the listview. what is the simple and useful way? (i will write any text in the textedit and the result shown automatically in the listview)

    best regards.

  2. #2
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Listview Item/Data Search

    Hi,

    One such solution for search bar is in this thread

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    76

    Re: Listview Item/Data Search

    @kusumk thank u. i tried it. so good but it is not searching data in the listview.

    best regards.

  4. #4
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: Listview Item/Data Search

    hi prodigy47

    you have to create a components, which will inform model about search criteria and model will modify itself accordingly, makes listview shows searching data

  5. #5
    Registered User
    Join Date
    Oct 2011
    Posts
    76

    Re: Listview Item/Data Search

    @vladestCh thanx for ur reply. is there any example or example code?

    best regards.

  6. #6
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: Listview Item/Data Search

    well, in my case I'm using c++ sql model subclass as data source and here is qml code caling it:

    SearchBox {
    id: searchbox
    placeHolderText: qsTr("Search text")
    onSearchTextChanged: {
    TransactionsModel.search(searchbox.searchText)
    }
    }

    TransactionsModel.search is method in the model which is search in database on given criteria and inform the model about changes

  7. #7
    Registered User
    Join Date
    Oct 2011
    Posts
    76

    Re: Listview Item/Data Search

    it is a symbian element. i am not using it in the meego (for my listview). any way?

    best regards.
    Last edited by prodigy47; 2012-06-01 at 23:05.

  8. #8
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: Listview Item/Data Search

    I think its easy to c'n'p the element from symbian qt-components to your project

  9. #9
    Registered User
    Join Date
    Oct 2011
    Posts
    76

    Re: Listview Item/Data Search

    i need another way. anybody can help me?

    best regards.
    Last edited by prodigy47; 2012-06-04 at 20:58.

  10. #10
    Registered User
    Join Date
    Oct 2011
    Posts
    76

    Re: Listview Item/Data Search

    hi m8,
    still no any reply. how can i fix my issues?
    best regards.

  11. #11
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: Listview Item/Data Search

    hi

    I think, you have to get the qt-components sources and investigate how SearchBox works

  12. #12
    Registered User
    Join Date
    Oct 2011
    Posts
    76

    Re: Listview Item/Data Search

    i didnt find anything for this subject. i tried do with textfield element. but textchanged event of textfield not worked. please help me. its important for me. i want to part of code or example project.

    best regards.

  13. #13
    Regular Contributor
    Join Date
    Mar 2012
    Posts
    144

    Re: Listview Item/Data Search

    hi

    provide sources, plz

Similar Threads

  1. Help please - How to search through a ListView using qml?
    By Maximus_ndb in forum [Archived] Qt Quick
    Replies: 4
    Last Post: 2012-04-05, 07:24
  2. Replies: 9
    Last Post: 2012-03-06, 11:30
  3. New item can't display in ListView.
    By useryy2 in forum [Archived] Qt Quick
    Replies: 4
    Last Post: 2012-02-26, 09:39
  4. How to access ListView current item data?
    By Sasler in forum [Archived] Qt Quick
    Replies: 1
    Last Post: 2011-11-03, 15:11
  5. How to get Listview selected item
    By amol_benare604 in forum Qt
    Replies: 1
    Last Post: 2010-11-18, 09:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •