Changed type of sideTabBarArea properties to int to fix non working Linux stylesheet selectors

This commit is contained in:
Uwe 2022-10-28 15:20:56 +02:00
parent 6adce7337b
commit f4bfa0f3c5
6 changed files with 11 additions and 11 deletions

View File

@ -53,7 +53,7 @@ class CDockingStateReader;
class ADS_EXPORT CAutoHideDockContainer : public QFrame
{
Q_OBJECT
Q_PROPERTY(ads::SideBarLocation sideTabBarArea READ sideTabBarArea)
Q_PROPERTY(int sideTabBarArea READ sideTabBarArea)
private:
AutoHideDockContainerPrivate* d; ///< private data (pimpl)
friend struct AutoHideDockContainerPrivate;

View File

@ -47,7 +47,7 @@ struct DockWidgetSideTabPrivate
{
CDockWidgetSideTab* _this;
CDockWidget* DockWidget;
CSideTabBar* SideTabBar;
CSideTabBar* SideTabBar = nullptr;
Qt::Orientation Orientation{Qt::Vertical};
/**
@ -106,7 +106,7 @@ CDockWidgetSideTab::~CDockWidgetSideTab()
//============================================================================
void CDockWidgetSideTab::updateStyle()
{
internal::repolishStyle(this, internal::RepolishDirectChildren);
internal::repolishStyle(this, internal::RepolishDirectChildren);
update();
}
@ -114,10 +114,10 @@ void CDockWidgetSideTab::updateStyle()
//============================================================================
SideBarLocation CDockWidgetSideTab::sideTabBarArea() const
{
auto dockAreaWidget = d->DockWidget->dockAreaWidget();
if (dockAreaWidget && dockAreaWidget->isAutoHide())
if (d->SideTabBar)
{
return dockAreaWidget->autoHideDockContainer()->sideTabBarArea();
qDebug() << "CDockWidgetSideTab::sideTabBarArea() " << d->SideTabBar->sideTabBarArea();
return d->SideTabBar->sideTabBarArea();
}
return Left;

View File

@ -50,7 +50,7 @@ class ADS_EXPORT CDockWidgetSideTab : public CPushButton
{
Q_OBJECT
Q_PROPERTY(ads::SideBarLocation sideTabBarArea READ sideTabBarArea)
Q_PROPERTY(int sideTabBarArea READ sideTabBarArea)
Q_PROPERTY(Qt::Orientation orientation READ orientation)
Q_PROPERTY(bool activeTab READ isActiveTab)

View File

@ -24,7 +24,7 @@ class ADS_EXPORT CResizeHandle : public QFrame
{
Q_OBJECT
Q_DISABLE_COPY(CResizeHandle)
Q_PROPERTY(bool opaqueResize READ opaqueResize WRITE setOpaqueResize)
Q_PROPERTY(bool opaqueResize READ opaqueResize WRITE setOpaqueResize)
private:
ResizeHandlePrivate* d; ///< private data (pimpl)
friend struct ResizeHandlePrivate;

View File

@ -128,10 +128,10 @@ CSideTabBar::~CSideTabBar()
//============================================================================
void CSideTabBar::insertSideTab(int Index, CDockWidgetSideTab* SideTab)
{
SideTab->updateOrientationForArea(d->SideTabArea);
SideTab->installEventFilter(this);
d->TabsLayout->insertWidget(Index, SideTab);
SideTab->setSideTabBar(this);
SideTab->updateOrientationForArea(d->SideTabArea);
d->TabsLayout->insertWidget(Index, SideTab);
show();
}

View File

@ -50,7 +50,7 @@ class CAutoHideDockContainer;
class ADS_EXPORT CSideTabBar : public QFrame
{
Q_OBJECT
Q_PROPERTY(ads::SideBarLocation sideTabBarArea READ sideTabBarArea)
Q_PROPERTY(int sideTabBarArea READ sideTabBarArea)
Q_PROPERTY(Qt::Orientation orientation READ orientation)
private: