[Qt-interest] [SOLVED] Re: Get focus for a specific widget automatically when primary widget get focus ?

Aaron Lewis the.warl0ck.1989 at gmail.com
Tue Nov 9 01:19:28 CET 2010


On 11/08/2010 11:06 PM, Andre Haupt wrote:
> On Mon, Nov 08, 2010 at 09:42:37PM +0800, Aaron Lewis wrote:
>> Hi,
>> 	Conceive that inside primary QWidget , i got a QLineEdit and each time
>> if my application was restored from minimized state , i need this
>> QLineEdit to get focus automatically , and function dedicated for this
>> requirement ?
> 
> You could reimplemtent  QObject::event() for your primary widget (or use an event filter), grab the Show Event and set the focus to yout QLineEdit.

Yeah , that works , thanks !


-- 
Best Regards,
Aaron Lewis - PGP: 0xDFE6C29E
Key Server: http://keyserver.veridis.com
Finger Print: 9482 448F C7C3 896C 1DFE 7DD3 2492 A7D0 DFE6 C29E



More information about the Qt-interest-old mailing list