accel problems: might be qt-copt, might be kdelibs

Alexander Neundorf alexander.neundorf at gmx.net
Sun Oct 13 12:11:35 BST 2002


On Sunday 13 October 2002 12:33, Ingo Klöcker wrote:
...
>
> The problem is that we want to override all actions of the listview with
> our own KActions. And these KActions are defined in KMMainWindow
> because it handles the actions for all our widgets. I guess we will
> have to overwrite KListView::keyPressEvent() in order to prevent the
> listview from stealing our keys. The following crude patch which simply
> hides all key press events from our listview seems to fix our problems
> AFAICS.
>
> ======
> - --- kmfoldertree.h~     Mon Oct  7 20:37:55 2002
> +++ kmfoldertree.h      Sun Oct 13 12:24:20 2002
> @@ -194,6 +194,14 @@
>    /** Catch palette changes */
>    virtual bool event(QEvent *e);
>
> +  /**
> +   * Reimplemented in order to suppress keys which should be processed
> +   * by the main window.
> +   *
> +   * The API is unaffected.
> +   */
> +  virtual void keyPressEvent( QKeyEvent* ) {};

Shouldn't it be keyPressEvent(QKEyEvent *e) { e->ignore();}  ?


Bye
Alex





More information about the kde-core-devel mailing list