author | zecke <zecke> | 2003-10-07 12:56:18 (UTC) |
---|---|---|
committer | zecke <zecke> | 2003-10-07 12:56:18 (UTC) |
commit | 6f807f937764d0b80d38cd5e29983ad4ec2ae3c8 (patch) (side-by-side diff) | |
tree | a1fc0bf579e5dfa0b07813110e998d4ea97d5c78 /libopie/big-screen/example/osplitter_mail.cpp | |
parent | 898d453b417e561cea25f6b7578814d31cec6e97 (diff) | |
download | opie-6f807f937764d0b80d38cd5e29983ad4ec2ae3c8.zip opie-6f807f937764d0b80d38cd5e29983ad4ec2ae3c8.tar.gz opie-6f807f937764d0b80d38cd5e29983ad4ec2ae3c8.tar.bz2 |
Just a small example on usage of an Event Filter...
I needed that for debugging but it looks useful as an example
Diffstat (limited to 'libopie/big-screen/example/osplitter_mail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/big-screen/example/osplitter_mail.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libopie/big-screen/example/osplitter_mail.cpp b/libopie/big-screen/example/osplitter_mail.cpp index 91442c8..4eaf3a9 100644 --- a/libopie/big-screen/example/osplitter_mail.cpp +++ b/libopie/big-screen/example/osplitter_mail.cpp @@ -22,6 +22,7 @@ class Folder { ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) : QWidget( p, name, fl ) { + qApp->installEventFilter( this ); m_lstFolders.setAutoDelete( true ); QHBoxLayout *lay = new QHBoxLayout(this); @@ -68,3 +69,14 @@ ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) ListViews::~ListViews() { } + + +bool ListViews::eventFilter( QObject* obj, QEvent* ev ) { + if (!obj->isWidgetType() ) + return false; + if ( ev->type() == QEvent::MouseButtonRelease ) { + qWarning(" name %s, class %s", obj->name(), obj->className() ); + } + + return false; +} |