Results 1 to 1 of 1

Thread: QComboBox Remove Item on Key_Delete press

  1. #1
    Join Date
    Sep 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Post QComboBox Remove Item on Key_Delete press

    Hi,

    I am using PyQt ..

    I want to remove an Item from the QComboBox drop down when it is highlighted and user
    presses "Delete" key ...

    What I am doing :

    I reimplemented QComboBox and handled keyReleaseEvent but the issue here is that this event gets called only when I hit "Delete" on the comboBox lineEdit.


    One way, I understand is that I can get the view using QComboBox.view(), attach a signal and slot to the view and handle that. But then what signal it should be and can I use "keyReleaseEvent" as slot ? .. I am little confused here..

    For interpretation, I see comboBox as combination of lineEdit and Drop down view...

    Please let me know if I am unclear.
    Last edited by ssal; 1st October 2010 at 20:58. Reason: updated contents

Similar Threads

  1. Remove an item
    By giusepped in forum Qwt
    Replies: 1
    Last Post: 16th September 2009, 08:47
  2. Replies: 2
    Last Post: 1st August 2008, 17:58
  3. QComboBox: remove drop Down Arrow
    By GuS in forum Qt Programming
    Replies: 2
    Last Post: 30th May 2008, 05:05
  4. remove item from QListWidget
    By yushinee in forum Newbie
    Replies: 3
    Last Post: 2nd October 2007, 21:40
  5. QCombobox remove checkbox
    By ucomesdag in forum Qt Programming
    Replies: 6
    Last Post: 1st August 2007, 01:38

Tags for this Thread

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.