mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-05 23:17:10 +01:00
qt: use QMenu->exec instead of QMenu->popup to simulate win32 behavior
git-svn-id: trunk@29781 -
This commit is contained in:
parent
13cb137a99
commit
5bb62f9253
@ -1353,6 +1353,7 @@ type
|
||||
function getText: WideString; override;
|
||||
function getVisible: Boolean; override;
|
||||
procedure PopUp(pos: PQtPoint; at: QActionH = nil);
|
||||
procedure Exec(pos: PQtPoint; at: QActionH = nil);
|
||||
procedure removeActionGroup;
|
||||
procedure setChecked(p1: Boolean);
|
||||
procedure setCheckable(p1: Boolean);
|
||||
@ -10878,7 +10879,12 @@ end;
|
||||
|
||||
procedure TQtMenu.PopUp(pos: PQtPoint; at: QActionH);
|
||||
begin
|
||||
QMenu_Popup(QMenuH(Widget), pos, at);
|
||||
QMenu_popup(QMenuH(Widget), pos, at);
|
||||
end;
|
||||
|
||||
procedure TQtMenu.Exec(pos: PQtPoint; at: QActionH);
|
||||
begin
|
||||
QMenu_exec(QMenuH(Widget), pos, at);
|
||||
end;
|
||||
|
||||
function TQtMenu.actionHandle: QActionH;
|
||||
|
||||
@ -473,7 +473,8 @@ begin
|
||||
else
|
||||
TQtMenu(APopupMenu.Handle).trackButton := QtRightButton;
|
||||
|
||||
TQtMenu(APopupMenu.Handle).PopUp(@Point);
|
||||
// for win32 compatibility do a blocking call
|
||||
TQtMenu(APopupMenu.Handle).Exec(@Point);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user