[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] no access to protected functions or signals for objects
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2011-01-25 13:23:52
Message-ID: 7a97f50eac2fe01ed9dbe45ec49f9ba8 () localhost
[Download RAW message or body]
On Tue, 25 Jan 2011 16:10:18 +0300, disconnext <disconnexttt@gmail.com>
wrote:
> I need a main window catching all keyboard events, but with all child
> widgets (hundreds of them) working correctly. So I try:
>
> class MainWindow(QMainWindow):
>
> def __init__(self, parent=None):
> super(MainWindow, self).__init__(parent)
> self.grabKeyboard()
> ......
>
> def keyPressEvent(self, event):
> ..........
> self.focusWidget().keyPressEvent(event)
>
>
>
> I got this error
> RuntimeError: no access to protected functions or signals for objects
> not created from Python
>
>
> Is there any workaround?
Install an event filter?
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic