[PyKDE] Retaining focus on a QLineEdit

Eron Lloyd elloyd at lancaster.lib.pa.us
Tue Mar 9 15:37:01 GMT 2004

Does anyone know of a way to properly allow a QLineEdit (or any widget for 
that matter) to retain keyboard focus? I'm writing an app that receives input 
from a barcode reader and emits a returnPressed() signal to a function that 
catches it, and processes the text() result. As many barcodes may be scanned, 
I'd like for the QLineEdit to regain focus after the function is called, so 
it can receive the next input. I think the problem is because it's on a page 
in a QWizard, which proceeds to the next page after picking up the CRLF. It 
seems the Next button always has keyboard focus, too. Could that be part of 



Eron Lloyd
Technology Coordinator
Lancaster County Library
elloyd at lancaster.lib.pa.us
Phone: 717-239-2116
Fax: 717-394-3083
[This E-mail scanned for viruses by Declude Virus]

More information about the PyQt mailing list