Results 1 to 3 of 3

Thread: QCompleter popup item is not selectable using mouse

  1. #1
    Join Date
    Jun 2010
    Posts
    97
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QCompleter popup item is not selectable using mouse

    Hi All,

    I am using QCompleter on QLineEdit. I am able to attach completer and popup is display with the filter of text I typed. The only challenge is that whatever filtered list is there I am able to select with arrow key but when I tried to select item from popup using mouse, it is not happening.
    I have written below code.
    Qt Code:
    1. QStringList frecs = {"One","Two","Three","Four","Five"}
    2. QCompleter *completer = new QCompleter(frecs, this);
    3. completer->setCompletionMode(QCompleter::PopupCompletion);
    4. completer->setFilterMode(Qt::MatchContains);
    5. completer->setCaseSensitivity(Qt::CaseInsensitive);
    6. completer->popup()->installEventFilter(this);
    7. ui->txSearch->setCompleter(completer);
    To copy to clipboard, switch view to plain text mode 

    Can anybody help to resolve this issue.

    Cheers

    Manish

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QCompleter popup item is not selectable using mouse

    What happens when you remove the event filter you have installed on the popup?
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  3. #3
    Join Date
    Jun 2010
    Posts
    97
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCompleter popup item is not selectable using mouse

    Event though I remove event filter no change and still mouse does not work.

Similar Threads

  1. QCompleter popup width
    By Thuan Seah Tan in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2011, 01:49
  2. How can I customize the QCompleter popup window in PyQt?
    By bifftanner in forum Qt Programming
    Replies: 0
    Last Post: 30th October 2011, 18:00
  3. Replies: 0
    Last Post: 17th September 2010, 13:19
  4. Replies: 1
    Last Post: 10th June 2010, 18:22
  5. How can I do, item is read only and not selectable ?
    By newermind in forum Qt Programming
    Replies: 11
    Last Post: 14th August 2009, 15:09

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.