mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-15 20:59:16 +02:00
parent
cdbaf61026
commit
395b20981f
@ -632,8 +632,6 @@ type
|
|||||||
// used to store values if no selection
|
// used to store values if no selection
|
||||||
FSelStart: Integer;
|
FSelStart: Integer;
|
||||||
FSelLength: Integer;
|
FSelLength: Integer;
|
||||||
// stop event processing on droplist
|
|
||||||
FDynPropChanged: Boolean;
|
|
||||||
function GetDropList: TQtListWidget;
|
function GetDropList: TQtListWidget;
|
||||||
function GetLineEdit: QLineEditH;
|
function GetLineEdit: QLineEditH;
|
||||||
procedure SetOwnerDrawn(const AValue: Boolean);
|
procedure SetOwnerDrawn(const AValue: Boolean);
|
||||||
@ -5182,7 +5180,6 @@ begin
|
|||||||
WriteLn('TQtComboBox.Create');
|
WriteLn('TQtComboBox.Create');
|
||||||
{$endif}
|
{$endif}
|
||||||
Result := QComboBox_create();
|
Result := QComboBox_create();
|
||||||
FDynPropChanged := False;
|
|
||||||
FLineEdit := nil;
|
FLineEdit := nil;
|
||||||
FOwnerDrawn := False;
|
FOwnerDrawn := False;
|
||||||
end;
|
end;
|
||||||
@ -5376,6 +5373,7 @@ end;
|
|||||||
|
|
||||||
procedure TQtComboBox.DetachEvents;
|
procedure TQtComboBox.DetachEvents;
|
||||||
begin
|
begin
|
||||||
|
QObject_hook_destroy(FDropListEventHook);
|
||||||
QComboBox_hook_destroy(FActivateHook);
|
QComboBox_hook_destroy(FActivateHook);
|
||||||
QComboBox_hook_destroy(FChangeHook);
|
QComboBox_hook_destroy(FChangeHook);
|
||||||
QComboBox_hook_destroy(FSelectHook);
|
QComboBox_hook_destroy(FSelectHook);
|
||||||
@ -5391,14 +5389,6 @@ var
|
|||||||
DynPropChars: PAnsiChar;
|
DynPropChars: PAnsiChar;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
begin
|
begin
|
||||||
Result := FDynPropChanged;
|
|
||||||
|
|
||||||
if Result then
|
|
||||||
begin
|
|
||||||
QEvent_accept(Event);
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
|
|
||||||
BeginEventProcessing;
|
BeginEventProcessing;
|
||||||
if (FDropList <> nil) and (Sender = FDropList.Widget) then
|
if (FDropList <> nil) and (Sender = FDropList.Widget) then
|
||||||
begin
|
begin
|
||||||
@ -5407,24 +5397,6 @@ begin
|
|||||||
QEvent_accept(Event);
|
QEvent_accept(Event);
|
||||||
|
|
||||||
case QEvent_type(Event) of
|
case QEvent_type(Event) of
|
||||||
QEventDynamicPropertyChange:
|
|
||||||
begin
|
|
||||||
DynPropName := QByteArray_create();
|
|
||||||
try
|
|
||||||
QDynamicPropertyChangeEvent_propertyName(
|
|
||||||
QDynamicPropertyChangeEventH(Event), DynPropName);
|
|
||||||
DynPropChars := QByteArray_constData(DynPropName);
|
|
||||||
Str := '';
|
|
||||||
for i := 0 to QByteArray_length(DynPropName) - 1 do
|
|
||||||
begin
|
|
||||||
Str := Str + DynPropChars^;
|
|
||||||
inc(DynPropChars);
|
|
||||||
end;
|
|
||||||
FDynPropChanged := Str = 'lclwidget';
|
|
||||||
finally
|
|
||||||
QByteArray_destroy(DynPropName);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
QEventShow: SlotDropListVisibility(True);
|
QEventShow: SlotDropListVisibility(True);
|
||||||
QEventHide:
|
QEventHide:
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user