tags:

views:

24

answers:

1

I would like for a user to be able to "delete" a frame from a series of frames in a vertical layout using the delete/backspace keys on the keyboard, but I do not know how to make it so that a frame is selectable. Does any one know of a way to do this (in C++)?

Thank you in advance!

+1  A: 

Derive a new class from QFrame. Then implement some member functions according to your needs. For example, if you want to select the frame with mouse, implement mousePressEvent and if you want to process the delete key, implement keyPressEvent.

Note that you must handle displaying the frame selection by yourself, for example by changing the frame background color.

Roku