KDDockWidgets API Documentation
1.3
|
Struct describing the preferred dock widget size and visibility when adding it to a layout. More...
#include <KDDockWidgets.h>
Public Member Functions | |
InitialOption (AddingOption opt) | |
InitialOption (InitialVisibilityOption v) | |
InitialOption (InitialVisibilityOption v, QSize size) | |
InitialOption (QSize size) | |
bool | hasPreferredLength (Qt::Orientation o) const |
int | preferredLength (Qt::Orientation o) const |
bool | startsHidden () const |
Public Attributes | |
const QSize | preferredSize |
Allows to control the size a dock widget should get when docked. More... | |
const InitialVisibilityOption | visibility = InitialVisibilityOption::StartVisible |
Allows a dock widget to be docked as hidden. More... | |
Struct describing the preferred dock widget size and visibility when adding it to a layout.
You can pass this to MainWindowBase::addDockWidget() to give an hint of your preferred size and visibility.
See bellow the documentation for InitialOption::visibility and InitialOption::preferredSize.
const QSize KDDockWidgets::InitialOption::preferredSize |
Allows to control the size a dock widget should get when docked.
If an invalid or empty size is passed then KDDW's default heuristics are applied.
Note that usually only the width or the height will be honoured: For example, when adding a dock widget to the left then only the preferred width will be taken into account, as the height will simply fill the whole layout.
const InitialVisibilityOption KDDockWidgets::InitialOption::visibility = InitialVisibilityOption::StartVisible |
Allows a dock widget to be docked as hidden.
Next time you call DockWidget::show() it will be shown at that place. This avoids flickering, as no show()/hide() workarounds are needed.