Skip to content Skip to sidebar Skip to footer

Catching A Keypressevent In A Qtreewidget With No Focus

So I desired to remove the ugly dotted border on my QTreeWidget by setting NoFocus on the focus policy. Now I need to catch keyPressEvents, but the focus policy is preventing that.

Solution 1:

I assume you are trying to do something that you really shouldn't, but anyways …

This is the way to go: http://doc.qt.io/qt-4.8/qwidget.html#grabKeyboard

Post a Comment for "Catching A Keypressevent In A Qtreewidget With No Focus"