how to accept/ignore QKeyEvent
问题 http://qt-project.org/doc/qt-5/qwidget.html#keyPressEvent Note that QKeyEvent starts with isAccepted() == true, so you do not need to call QKeyEvent::accept() - just do not call the base class implementation if you act upon the key. http://qt-project.org/doc/qt-5/qkeyevent.html#details A key event contains a special accept flag that indicates whether the receiver will handle the key event. You should call ignore() if the key press or release event is not handled by your widget. A key event is