Carson Farmer <[email protected]> scritti il 22/04/2009 10.55.31

> Hi Luca,

> You can probably do this via the keyPressEvent() of your plugin dialog:

> def keyPressEvent( self, e ):
> if ( e.modifiers() == Qt.ControlModifier or e.modifiers() ==
> Qt.MetaModifier ) and e.key() == Qt.Key_Some_Key:
> # run the tool
> else:
> QDialog.keyPressEvent( self, e )
>
> Hope that helps,

I tried this in the QDialog inherited class:

  def keyPressEvent (self, e):
    if e.modifiers() == Qt.ControlModifier and e.key() == Qt.Key_C:
        exec()
    else:
        QDialog.keyPressEvent( self, e )

but it seems that this is never called.

Any idea?

_______________________________________________
Qgis-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to