fix cmakelists and remove setDefaultDockProportion from dock widget

This commit is contained in:
Syarif Fakhri 2022-10-28 14:21:12 +08:00
parent c2bd56e2e9
commit 2a97833d02
2 changed files with 5 additions and 3 deletions

View File

@ -12,6 +12,7 @@
#include <QPlainTextEdit>
#include <QToolBar>
#include "AutoHideDockContainer.h"
#include "DockAreaWidget.h"
#include "DockAreaTitleBar.h"
@ -44,10 +45,9 @@ CMainWindow::CMainWindow(QWidget *parent)
CDockWidget* TableDockWidget = new CDockWidget("Table 1");
TableDockWidget->setWidget(table);
TableDockWidget->setMinimumSizeHintMode(CDockWidget::MinimumSizeHintFromDockWidget);
TableDockWidget->resize(250, 150);
TableDockWidget->setMinimumSize(200,150);
TableDockWidget->setDefaultAutoHideDockProportion(0.5);
DockManager->addAutoHideDockWidget(SideBarLocation::Left, TableDockWidget, CDockWidget::Last);
const auto autoHideContainer = DockManager->addAutoHideDockWidget(SideBarLocation::Left, TableDockWidget, CDockWidget::Last);
autoHideContainer->setSize(480, 100);
ui->menuView->addAction(TableDockWidget->toggleViewAction());
table = new QTableWidget();

View File

@ -31,6 +31,7 @@ set(ads_SRCS
DockWidgetSideTab.cpp
AutoHideDockContainer.cpp
PushButton.cpp
ResizeHandle.cpp
ads.qrc
)
set(ads_HEADERS
@ -56,6 +57,7 @@ set(ads_HEADERS
DockWidgetSideTab.h
AutoHideDockContainer.h
PushButton.h
ResizeHandle.h
)
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")
if (UNIX AND NOT APPLE)