54 if (!widget.isNull() && widget && hiderWidget) {
55 widget->setParent(hiderWidget);
58 qDeleteAll(currentAuxWidgets);
59 currentAuxWidgets.clear();
61 currentWidgetList = optionWidgetList;
64 housekeeperLayout->setRowStretch(housekeeperLayout->rowCount()-1, 0);
69 switch (dockingArea) {
70 case Qt::TopDockWidgetArea:
71 case Qt::BottomDockWidgetArea:
72 housekeeperMainLayout->setDirection(QBoxLayout::LeftToRight);
73 housekeeperMainLayout->setStretch(0, 1);
74 housekeeperMainLayout->setStretch(1, 0);
75 housekeeperLayout->setHorizontalSpacing(2);
76 housekeeperLayout->setVerticalSpacing(0);
78 if (widget.isNull() || widget->objectName().isEmpty()) {
81 if (!widget->windowTitle().isEmpty()) {
82 housekeeperLayout->addWidget(
83 l =
new QLabel(widget->windowTitle()),
86 currentAuxWidgets.insert(l);
88 housekeeperLayout->addWidget(widget, 1, 2 * cnt);
90 if (widget != currentWidgetList.last()) {
91 housekeeperLayout->addWidget(s =
new QFrame(),
96 s->setFrameShape(QFrame::VLine);
97 currentAuxWidgets.insert(s);
102 case Qt::NoDockWidgetArea:
103 case Qt::LeftDockWidgetArea:
104 case Qt::RightDockWidgetArea: {
105 housekeeperMainLayout->setDirection(QBoxLayout::TopToBottom);
106 housekeeperMainLayout->setStretch(0, 0);
107 housekeeperMainLayout->setStretch(1, 1);
108 housekeeperLayout->setHorizontalSpacing(0);
109 housekeeperLayout->setVerticalSpacing(2);
111 if (widget.isNull() || widget->objectName().isEmpty()) {
114 if (!widget->windowTitle().isEmpty()) {
115 housekeeperLayout->addWidget(
116 l =
new QLabel(widget->windowTitle()),
119 currentAuxWidgets.insert(l);
121 housekeeperLayout->addWidget(widget, cnt++, 0);
123 if (widget != currentWidgetList.last()) {
124 housekeeperLayout->addWidget(s =
new QFrame(), cnt++, 0);
125 s->setFrameStyle(QFrame::HLine | QFrame::Sunken);
126 currentAuxWidgets.insert(s);
135 housekeeperLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
136 housekeeperLayout->invalidate();