Qt: fixed bug in TQtCalendar, where mouse move,enter and leave weren't propagated to LCL from dates (QAbstractScrollArea) part of calendar.

git-svn-id: trunk@29836 -
This commit is contained in:
zeljko 2011-03-14 09:22:44 +00:00
parent d257609a59
commit ef4e2fb352

View File

@ -12204,6 +12204,7 @@ var
i: integer;
Children: TPtrIntArray;
AnObject: QObjectH;
WP: QWidgetH;
begin
inherited AttachEvents;
@ -12229,7 +12230,9 @@ begin
{do not localize !!}
if QObject_inherits(AnObject,'QAbstractScrollArea') then
begin
FCalViewportEventHook := QObject_hook_create(QAbstractScrollArea_viewport(QAbstractScrollAreaH(AnObject)));
WP := QAbstractScrollArea_viewport(QAbstractScrollAreaH(AnObject));
QWidget_setMouseTracking(WP, True);
FCalViewportEventHook := QObject_hook_create(WP);
QObject_hook_hook_events(FCalViewportEventHook, @calViewportEventFilter);
end;
end;
@ -12258,6 +12261,9 @@ begin
if (LCLObject <> nil) then
begin
case QEvent_type(Event) of
QEventMouseMove: Result := SlotMouseMove(Sender, Event);
QEventEnter,
QEventLeave: Result := SlotMouseEnter(Sender, Event);
QEventMouseButtonDblClick: FMouseDoubleClicked := True;
end;
end;