开发者

Handling keyboard input in QListView

I would like to delete an item from a QListView when the delete key is pressed. I know I can override QListView::keyPressEvent but I need to do the deletion from a different class. Is there any signal I could use to detect开发者_运维知识库 the delete key?


Check QObject::installEventFilter, I think it is exactly what you are looking for and also has a small example for your case.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜