[Lazarus] How to create a non focusable form?

Zeljko zeljko at holobit.net
Wed Oct 28 10:59:59 CET 2015



On 10/27/2015 05:07 PM, Gabor Boros wrote:
> 2015.10.27. 16:16 keltezéssel, Zeljko írta:
>>
>> csNoFocus does not work for Qt ? Can you provide example ?
>> For Qt: before example try to include qt4 and qtwidgets into your unit
>> and then
>> in CreateWnd of your custom form (or after form handle is created)
>>
>> TQtMainWindow(YourForm.Handle).SetFocusPolicy(QtNoFocus);
>> TQtMainWindow(YourForm.Handle).WindowArea.SetFocusPolicy(QtNoFocus);
>
> WindowArea not exist, found ScrollAera which is TQtWindowArea type.
> But not have any effect for me. Example attached (without Qt and
> WMNCHitTest trick).

Please test with attached patch and give feedback. Note that this patch 
is tested under Qt X11 only.

zeljko
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qt_activation_fix.diff
Type: text/x-patch
Size: 1245 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151028/4da5f2f8/attachment-0003.bin>


More information about the Lazarus mailing list