Results 1 to 2 of 2

Thread: Select item on double clicking in QComboBox

  1. #1

    Default Select item on double clicking in QComboBox

    Hi everyone,

    I have implemented tree view in ComboBox but when i am expanding the view the combobox popup closes, so i want first to select item from treeView and then on doubleclick that item should be selected.

    Coul you please point me in right direction to do this?

    Thanks

  2. #2

    Default Re: Select item on double clicking in QComboBox

    In case anybody crosses the same proble as i did - after a little more serching I think that there are at least two solutions to my question:
    - install an event filter on the view for the combobox and when a mouse button release, you can eat the release mouse button event, so it would prevent it from closing the popup. Then on double click you call hidePopup()
    - the second is to subclass QComboBox and its mouse release event, so hidePopup() is not call there.

    If I am wrong about this please somebody correct me.

Similar Threads

  1. Double Clicking Pro File
    By BalaQT in forum Installation and Deployment
    Replies: 2
    Last Post: 18th November 2009, 05:23
  2. QListView icon double clicking
    By been_1990 in forum Qt Programming
    Replies: 8
    Last Post: 28th April 2009, 20:05
  3. Cannot select an item in QComboBox
    By Declan in forum Qt Programming
    Replies: 2
    Last Post: 19th April 2007, 08:08
  4. Double clicking with QTableView
    By DPinLV in forum Qt Programming
    Replies: 2
    Last Post: 13th September 2006, 06:22
  5. [QComboBox] (pre-)select no item. (solved)
    By lauranger in forum Qt Programming
    Replies: 4
    Last Post: 17th July 2006, 13:26

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.