Update Python bindings (#289)

* Update Python bindings

* Add X11Extras to setup.py for Linux builds

* Update Python Bindings

* Update Python bindings
This commit is contained in:
Nicolas Elie 2021-01-04 14:01:28 +01:00 committed by GitHub
parent 97215705f5
commit f835ffd978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 1 deletions

View File

@ -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:

View File

@ -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)

View File

@ -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<int> splitterSizes(ads::CDockAreaWidget *ContainedArea) const;
void setSplitterSizes(ads::CDockAreaWidget *ContainedArea, const QList<int>& sizes);
public slots:
void openPerspective(const QString& PerspectiveName);

View File

@ -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);