[PyQt] Getting mouse and key event with a qtablewidget
ephelon at gmail.com
Thu Mar 15 16:31:39 GMT 2007
There are two methods to accomplish this:
1. Subclass QTable and reimplement contentsKeyPressEvent() and
2. Add an eventFilter to the viewport of your table.
Of the two methods, the first is generally preferred. Have a look at
the Qt docs for more.
On 3/15/07, duncan duncan <duncan73 at gmail.com> wrote:
> I'd like to be able to process the mouse and key pressed event with a
> The goal is to have a table in which the number of rows and columns are
> created when certain keys are pressed and that had a context menu to delete
> An example can be: if I press the tab key on the last column, a column is
> added to the table or if I press the
> arrow down on the last row, a new row is added.
> Any hints ?
> PyQt mailing list PyQt at riverbankcomputing.com
More information about the PyQt