[PyQt] QLineEdit vs. menu keyboard shortcuts

Baz Walter bazwal at ftml.net
Thu Jun 30 22:54:49 BST 2011


On 30/06/11 16:56, Nathan Weston wrote:
> On 6/30/2011 10:44 AM, Nathan Weston wrote:
>> On 6/29/2011 6:16 PM, Baz Walter wrote:
> I updated to the latest Qt/PyQt and it's working now. My original
> application is working correctly as well.

glad you got it working.

one final thought: rather stupidly, i completely forgot about 
QEvent.ShortcutOverride, which may well be exactly what you were 
originally looking for.

it could be used something like this:

     def event(self, event):
         if (not self._editable and
             event.type() == QEvent.ShortcutOverride):
             return False
	return QLineEdit.event(self, event)

better late than never, i suppose :/


More information about the PyQt mailing list