Results 1 to 8 of 8

Thread: Qcompleter

  1. #1
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Qcompleter

    hi, i used a Qcompleter in the address bar of my browser, for autocompletion, but the problem is that the completion is only provided base on the prefix, is it possible to provide completion when the word type in the address bar is contains in any item in the completion list? if so, how?

  2. #2
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qcompleter

    please help!!!

  3. #3
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qcompleter

    No, this is not possible. Although you can set the column to begin comparison on, CompletionModels implicitly require a prefix in order to work.

    You could implement your own widget to do something like what you require. Doing so will show why it is a bad idea: because you're forced to check every position of every word in your list.

    Question: is the user really so incompetent that they can't be counted on to type correctly? Or will type correctly, but precede the correct portion with random gibberish?

    Perhaps you should explain exactly what it is you're trying to do. Frankly, it sounds ill considered from what you've presented here, but perhaps a more detailed explanation will suggest a reasonable approach.

  4. #4
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qcompleter

    thanks for your reply, and sorry for the quality of my english, i am french man!
    what i wanted is somting like in firefox or chrome, when you start typing an address in the adress bar, completion is provided based on the history! and this completion is not only done only using a prefix! for example, if the item "http://qtcentre.org" is in the completion list, i want it to be shown when the user type qt..., not only when he types http...! i hope i am a bit clearer now, could could you suggest me a method to do that?

  5. #5
    Join Date
    Oct 2009
    Posts
    364
    Thanks
    10
    Thanked 37 Times in 36 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

  6. #6
    Join Date
    Apr 2010
    Posts
    769
    Thanks
    1
    Thanked 94 Times in 86 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Qcompleter

    Quote Originally Posted by wambagilles View Post
    thanks for your reply, and sorry for the quality of my english, i am french man!
    what i wanted is somting like in firefox or chrome, when you start typing an address in the adress bar, completion is provided based on the history! and this completion is not only done only using a prefix! for example, if the item "http://qtcentre.org" is in the completion list, i want it to be shown when the user type qt..., not only when he types http...! i hope i am a bit clearer now, could could you suggest me a method to do that?
    If you want to begin with a specified column in the completion list, QCompleter supports that. It does not support unbounded searches throughout the string.

  7. #7
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qcompleter

    i think it will help, thanks!

  8. #8
    Join Date
    Feb 2011
    Posts
    55
    Thanks
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Qcompleter

    sorry i have not been able to use your QcompletionWidget, instead i reimplemented the Qcompleter class, now, i want to reimplement the method

    QAbstractItemModel *completionModel () const;

    so that i will populate the completion model my self!
    is that a good way to solve the problem? if yes, how should i do it? for example if i want to put the item "http://qtcentre.org" in completion list how should i do? if not, please what is a good way to solve this problem?

    need help!

Similar Threads

  1. QCompleter Help
    By shinegun in forum Qt Programming
    Replies: 0
    Last Post: 2nd September 2010, 13:26
  2. QTextEdit and QCompleter
    By nivel in forum Qt Programming
    Replies: 2
    Last Post: 14th June 2009, 03:18
  3. Replies: 1
    Last Post: 12th October 2008, 08:21
  4. Complex QCompleter
    By Amouse in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2008, 22:39
  5. Question about QCompleter
    By Ali in forum Qt Programming
    Replies: 3
    Last Post: 20th October 2007, 17:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.