(Qt): error while creating popup menu

git-svn-id: trunk@11664 -
This commit is contained in:
paul 2007-07-29 08:32:40 +00:00
parent 669a0e96f9
commit 0dae7e211d

View File

@ -35,7 +35,7 @@ uses
{$endif}
qtwidgets, qtobjects,
// LCL
SysUtils, Classes, Menus, Forms, LCLType, LCLProc, Graphics,
SysUtils, Classes, LCLType, LCLProc, Graphics, Controls, Forms, Menus,
// Widgetset
WSMenus, WSLCLClasses;
@ -384,8 +384,8 @@ begin
end
else if (AMenu is TPopUpMenu) then
begin
if AMenu.Owner <> nil then
Parent := TQtMainWindow(TCustomForm(AMenu.Owner).Handle).Widget
if (AMenu.Owner <> nil) and (AMenu.Owner is TWinControl) then
Parent := TQtWidget(TWinControl(AMenu.Owner).Handle).Widget
else
Parent := nil;