Qt: clearFocus only on IQtEdit interface.

git-svn-id: trunk@17278 -
This commit is contained in:
zeljko 2008-11-08 14:37:03 +00:00
parent dfbd3b0c8c
commit 9a0a1e6215

View File

@ -4325,6 +4325,8 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function TQtWidgetSet.SetFocus(hWnd: HWND): HWND; function TQtWidgetSet.SetFocus(hWnd: HWND): HWND;
var
QtEdit: IQtEdit;
begin begin
if hwnd<>0 then if hwnd<>0 then
begin begin
@ -4338,7 +4340,8 @@ begin
{$IFDEF UNIX} {$IFDEF UNIX}
if (Result <> 0) and (Result <> hWnd) and not if (Result <> 0) and (Result <> hWnd) and not
((TQtWidget(Hwnd) is TQtMainWindow) or ((TQtWidget(Hwnd) is TQtMainWindow) or
(TQtWidget(Result) is TQtMainWindow)) (TQtWidget(Result) is TQtMainWindow) and
Supports(TQtWidget(Result), IQtEdit, QtEdit))
then then
QWidget_clearFocus(TQtWidget(Result).Widget); QWidget_clearFocus(TQtWidget(Result).Widget);
{$ENDIF} {$ENDIF}