diff --git a/demo/demo.py b/demo/demo.py index 5ba8d42..1254eef 100644 --- a/demo/demo.py +++ b/demo/demo.py @@ -359,6 +359,7 @@ class MainWindow(MainWindowUI, MainWindowBase): floating = sender.property("Floating") dock_widget = self.create_editor_widget() dock_widget.setFeature(QtAds.CDockWidget.DockWidgetDeleteOnClose, True) + dock_widget.setFeature(QtAds.CDockWidget.DockWidgetForceCloseWithArea, True) dock_widget.closeRequested.connect(self.on_editor_close_requested) if floating: diff --git a/examples/centralwidget/centralWidget.py b/examples/centralwidget/centralWidget.py index e3f31c6..581b00d 100644 --- a/examples/centralwidget/centralWidget.py +++ b/examples/centralwidget/centralWidget.py @@ -106,6 +106,11 @@ class MainWindow(MainWindowUI, MainWindowBase): self.perspective_combobox.clear() self.perspective_combobox.addItems(self.dock_manager.perspectiveNames()) self.perspective_combobox.setCurrentText(perspective_name) + + def closeEvent(self, event: QCloseEvent): + self.dock_manager.deleteLater() + super().closeEvent(event) + if __name__ == '__main__': app = QApplication(sys.argv) diff --git a/sip/DockManager.sip b/sip/DockManager.sip index b76ee25..941fca7 100644 --- a/sip/DockManager.sip +++ b/sip/DockManager.sip @@ -135,7 +135,6 @@ protected: ads::CDockOverlay* dockAreaOverlay() const; void notifyWidgetOrAreaRelocation(QWidget* RelocatedWidget); void notifyFloatingWidgetDrop(ads::CFloatingDockContainer* FloatingWidget); - ads::CDockWidget* focusedDockWidget() const; virtual void showEvent(QShowEvent *event); @@ -217,6 +216,9 @@ public: void setViewMenuInsertionOrder(ads::CDockManager::eViewMenuInsertionOrder Order); bool isRestoringState() const; static int startDragDistance(); + ads::CDockWidget* focusedDockWidget() const; + QList splitterSizes(ads::CDockAreaWidget *ContainedArea) const; + void setSplitterSizes(ads::CDockAreaWidget *ContainedArea, const QList& sizes); public slots: void openPerspective(const QString& PerspectiveName); diff --git a/sip/DockWidgetTab.sip b/sip/DockWidgetTab.sip index 32d819b..0bc610a 100644 --- a/sip/DockWidgetTab.sip +++ b/sip/DockWidgetTab.sip @@ -35,6 +35,8 @@ public: virtual bool event(QEvent *e); void setElideMode(Qt::TextElideMode mode); void updateStyle(); + QSize iconSize() const; + void setIconSize(const QSize& Size); public slots: virtual void setVisible(bool visible);