There are two methods to accomplish this:

1.  Subclass QTable and reimplement contentsKeyPressEvent() and
contentsContextMenuEvent()

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.

James


On 3/15/07, duncan duncan <[EMAIL PROTECTED]> wrote:
Hello.

I'd like to be able to process the mouse and key pressed event with a
qtablewidget
The goal is to have a table in which the number of rows and columns are
dinamically
created when certain keys are pressed and that had a context menu to delete
the
row/column.

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 ?

thaks
 Gianluca



_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to