mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-23 06:59:31 +02:00
Qt: do not crash in TQtPage if parent is TTabControl
git-svn-id: trunk@42628 -
This commit is contained in:
parent
2743011353
commit
7c723d7f81
@ -15699,6 +15699,9 @@ begin
|
||||
AParent := getTabWidget;
|
||||
if CanReturnIndex or ATextChanging then
|
||||
Result := QTabWidget_indexOf(AParent, Widget)
|
||||
else
|
||||
if not QObject_inherits(QWidget_parentWidget(Widget),'QStackedWidget') then
|
||||
Result := 0
|
||||
else
|
||||
Result := -1;
|
||||
end;
|
||||
@ -15709,7 +15712,8 @@ var
|
||||
begin
|
||||
// it is placed to the stack widget and stack widget into tab widget
|
||||
AParent := QWidget_parentWidget(Widget);
|
||||
if AParent <> nil then
|
||||
// do not localize !
|
||||
if (AParent <> nil) and QObject_inherits(AParent,'QStackedWidget') then
|
||||
Result := QTabWidgetH(QWidget_parentWidget(AParent))
|
||||
else
|
||||
Result := nil;
|
||||
|
Loading…
Reference in New Issue
Block a user