On 15.03.07 16:51:13, duncan duncan wrote:
> 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 ?

For the context menu there exists the contextMenuEvent() member in
QWidget, so you can subclass QTableWidget and re-implement that method.

For the key-features you can override the keyPressEvent member function
and properly react on Tab and arrow key if you're in the "right"
position.

Andreas

-- 
Don't look back, the lemmings are gaining on you.

Attachment: pgpJMILMz9q7l.pgp
Description: PGP signature

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

Reply via email to