Qt5,Qt6: fixed QTabWidget clientRect calculation when showTabs = false. issue #40460

This commit is contained in:
Željan Rikalo 2023-10-04 21:45:02 +02:00
parent 44d402cde6
commit 7c901cbaae
2 changed files with 2 additions and 0 deletions

View File

@ -219,6 +219,7 @@ class function TQtWSCustomTabControl.GetDefaultClientRect(
QTabWidget_setTabPosition(ANewTabW, QTabWidgetTabPositionMap[TCustomTabControl(AWinControl).TabPosition]);
QTabWidget_setTabsClosable(ANewTabW, nboShowCloseButtons in TCustomTabControl(AWinControl).Options);
setTabSizeInternal(QWidgetH(ANewTabW), TCustomTabControl(AWinControl).TabHeight, TCustomTabControl(AWinControl).TabWidth);
QWidget_setVisible(QTabWidget_tabBar(ANewTabW), TCustomTabControl(AWinControl).ShowTabs);
QTabWidget_addTab(ANewTabW, QWidget_Create(nil), @WStr);
QTabWidget_setCurrentIndex(ANewTabW, 0);
QWidget_show(ANewTabW);

View File

@ -219,6 +219,7 @@ class function TQtWSCustomTabControl.GetDefaultClientRect(
QTabWidget_setTabPosition(ANewTabW, QTabWidgetTabPositionMap[TCustomTabControl(AWinControl).TabPosition]);
QTabWidget_setTabsClosable(ANewTabW, nboShowCloseButtons in TCustomTabControl(AWinControl).Options);
setTabSizeInternal(QWidgetH(ANewTabW), TCustomTabControl(AWinControl).TabHeight, TCustomTabControl(AWinControl).TabWidth);
QWidget_setVisible(QTabWidget_tabBar(ANewTabW), TCustomTabControl(AWinControl).ShowTabs);
QTabWidget_addTab(ANewTabW, QWidget_Create(nil), @WStr);
QTabWidget_setCurrentIndex(ANewTabW, 0);
QWidget_show(ANewTabW);