Qt,Qt5: fixed OnCloseUp event for TDBCustomComboBox. issue #39455

(cherry picked from commit d43d4618e4)
This commit is contained in:
Željan Rikalo 2021-11-08 15:07:07 +01:00 committed by Maxim Ganetsky
parent 63ed2c8183
commit 59eb318814
4 changed files with 12 additions and 9 deletions

View File

@ -326,7 +326,8 @@ const
LCLQt_DelayResizeEvent = QEventType(Ord(QEventUser) + $1010);
// systemtrayicon event, used to find and register private QWidget of QSystemTrayIcon
LCLQt_RegisterSystemTrayIcon = QEventType(Ord(QEventUser) + $1011);
// combobox OnCloseUp should be in order OnChange->OnSelect->OnCloseUp
LCLQt_ComboBoxCloseUp = QEventType(Ord(QEventUser) + $1012);
QtTextSingleLine = $0100;
QtTextDontClip = $0200;

View File

@ -12471,7 +12471,7 @@ end;
function TQtListWidget.EventFilter(Sender: QObjectH; Event: QEventH): Boolean; cdecl;
var
ev: QEventH;
ALCLEvent: QLCLMessageEventH;
begin
Result := False;
QEvent_accept(Event);
@ -12485,10 +12485,10 @@ begin
begin
{we must delay SlotDropDownVisiblity according to #9574
so order is OnChange(if editable)->OnSelect->OnCloseUp }
ev := QEvent_create(QEventHideToParent);
QCoreApplication_postEvent(Sender, ev);
ALCLEvent := QLCLMessageEvent_Create(LCLQt_ComboBoxCloseUp);
QCoreApplication_postEvent(Sender, ALCLEvent, Ord(QtHighEventPriority));
end;
QEventHideToParent: TQtComboBox(FOwner).SlotDropListVisibility(False);
LCLQt_ComboBoxCloseUp: TQtComboBox(FOwner).SlotDropListVisibility(False);
end;
end else
begin

View File

@ -322,6 +322,8 @@ const
LCLQt_DelayResizeEvent = QEventType(Ord(QEventUser) + $1010);
// systemtrayicon event, used to find and register private QWidget of QSystemTrayIcon
LCLQt_RegisterSystemTrayIcon = QEventType(Ord(QEventUser) + $1011);
// combobox OnCloseUp should be in order OnChange->OnSelect->OnCloseUp
LCLQt_ComboBoxCloseUp = QEventType(Ord(QEventUser) + $1012);
QtTextSingleLine = $0100;

View File

@ -12624,7 +12624,7 @@ end;
function TQtListWidget.EventFilter(Sender: QObjectH; Event: QEventH): Boolean;
cdecl;
var
ev: QEventH;
ALCLEvent: QLCLMessageEventH;
begin
Result := False;
QEvent_accept(Event);
@ -12638,10 +12638,10 @@ begin
begin
{we must delay SlotDropDownVisiblity according to #9574
so order is OnChange(if editable)->OnSelect->OnCloseUp }
ev := QEvent_create(QEventHideToParent);
QCoreApplication_postEvent(Sender, ev);
ALCLEvent := QLCLMessageEvent_Create(LCLQt_ComboBoxCloseUp);
QCoreApplication_postEvent(Sender, ALCLEvent, Ord(QtHighEventPriority));
end;
QEventHideToParent: TQtComboBox(FOwner).SlotDropListVisibility(False);
LCLQt_ComboBoxCloseUp: TQtComboBox(FOwner).SlotDropListVisibility(False);
end;
end else
begin