-rw-r--r-- | libopie/big-screen/example/osplitter_mail.cpp | 12 | ||||
-rw-r--r-- | libopie/big-screen/example/osplitter_mail.h | 1 |
2 files changed, 13 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 @@ -19,12 +19,13 @@ 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); m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); lay->addWidget( m_splitter ); connect(m_splitter, SIGNAL(sizeChange(bool, const QSize& ) ), @@ -65,6 +66,17 @@ 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; +} diff --git a/libopie/big-screen/example/osplitter_mail.h b/libopie/big-screen/example/osplitter_mail.h index d76f264..b7e7efe 100644 --- a/libopie/big-screen/example/osplitter_mail.h +++ b/libopie/big-screen/example/osplitter_mail.h @@ -22,12 +22,13 @@ class ListViews : public QWidget { Q_OBJECT public: static QString appName() { return QString::fromLatin1("osplitter-mail"); } ListViews( QWidget* parent, const char * name, WFlags fl ); ~ListViews(); + bool eventFilter( QObject* , QEvent* ); private: void initFolders(); void initFolder( Folder *folder, unsigned int &count ); QListView *m_messages, *m_overview; QLabel *m_message, *m_attach; |