KSplitterCollapserButton Class

A button which appears on the side of a splitter handle and allows easy collapsing of the widget on the opposite side. More...

Header: #include <KSplitterCollapserButton>
CMake: find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons)
Since: 5.5
Inherits: QToolButton

Public Functions

KSplitterCollapserButton(QWidget *childWidget, QSplitter *splitter)
bool isWidgetCollapsed() const

Public Slots

void collapse()
void restore()
void setCollapsed(bool collapsed)

Detailed Description

Member Function Documentation

[explicit] KSplitterCollapserButton::KSplitterCollapserButton(QWidget *childWidget, QSplitter *splitter)

KSplitterCollapserButton create a splitter collapser

childWidget the widget, child of the splitter, whose size is controlled by this collapser

splitter the splitter which this collapser should be associated with.

[slot] void KSplitterCollapserButton::collapse()

This function collapses the splitter if splitter is not collapsed.

bool KSplitterCollapserButton::isWidgetCollapsed() const

Returns true if splitter is collapsed.

[slot] void KSplitterCollapserButton::restore()

Call this function to restore previous splitter position.

[slot] void KSplitterCollapserButton::setCollapsed(bool collapsed)

This function allows to collapse or not the splitter.

collapsed if the splitter should be collapsed