Qt: fix updating tabcaption. fixes #16864

git-svn-id: trunk@26684 -
This commit is contained in:
zeljko 2010-07-16 13:49:50 +00:00
parent 168f6a214e
commit ed42b3ed5e

View File

@ -11903,9 +11903,19 @@ end;
function TQtPage.getIndex: Integer;
var
AParent: QTabWidgetH;
function CanReturnIndex: Boolean;
begin
Result := AParent <> nil;
if Result then
Result := QWidget_isVisible(AParent) or
( (QtVersionMajor >= 4) and (QtVersionMinor >= 6)
and LCLObject.HandleObjectShouldBeVisible );
end;
begin
AParent := getTabWidget;
if (AParent <> nil) and QWidget_isVisible(AParent) then
if CanReturnIndex then
Result := QTabWidget_indexOf(AParent, Widget)
else
Result := -1;