diff --git a/lib/qtermwidget.cpp b/lib/qtermwidget.cpp index 21f0a0a..5f8679b 100644 --- a/lib/qtermwidget.cpp +++ b/lib/qtermwidget.cpp @@ -688,3 +688,8 @@ bool QTermWidget::isTitleChanged() const { return m_impl->m_session->isTitleChanged(); } + +void QTermWidget::setAutoClose(bool autoClose) +{ + m_impl->m_session->setAutoClose(autoClose); +} diff --git a/lib/qtermwidget.h b/lib/qtermwidget.h index e486f58..ff5c580 100644 --- a/lib/qtermwidget.h +++ b/lib/qtermwidget.h @@ -211,6 +211,13 @@ public: */ void setKeyboardCursorShape(KeyboardCursorShape shape); + + /** + * Automatically close the terminal session after the shell process exits or + * keep it running. + */ + void setAutoClose(bool); + QString title() const; QString icon() const;