54 if (!widget.isNull() && widget && hiderWidget) {
55 widget->setParent(hiderWidget);
58 qDeleteAll(currentAuxWidgets);
59 currentAuxWidgets.clear();
61 currentWidgetList = optionWidgetList;
62 if (currentWidgetList.isEmpty())
return;
65 housekeeperLayout->setRowStretch(housekeeperLayout->rowCount()-1, 0);
70 switch (dockingArea) {
71 case Qt::TopDockWidgetArea:
72 case Qt::BottomDockWidgetArea:
73 housekeeperMainLayout->setDirection(QBoxLayout::LeftToRight);
74 housekeeperMainLayout->setStretch(0, 1);
75 housekeeperMainLayout->setStretch(1, 0);
76 housekeeperLayout->setHorizontalSpacing(2);
77 housekeeperLayout->setVerticalSpacing(0);
79 if (widget.isNull() || widget->objectName().isEmpty()) {
82 if (!widget->windowTitle().isEmpty()) {
83 housekeeperLayout->addWidget(
84 l =
new QLabel(widget->windowTitle()),
87 currentAuxWidgets.insert(l);
89 housekeeperLayout->addWidget(widget, 1, 2 * cnt);
91 if (widget != currentWidgetList.last()) {
92 housekeeperLayout->addWidget(s =
new QFrame(),
97 s->setFrameShape(QFrame::VLine);
98 currentAuxWidgets.insert(s);
103 case Qt::NoDockWidgetArea:
104 case Qt::LeftDockWidgetArea:
105 case Qt::RightDockWidgetArea: {
106 housekeeperMainLayout->setDirection(QBoxLayout::TopToBottom);
107 housekeeperMainLayout->setStretch(0, 0);
108 housekeeperMainLayout->setStretch(1, 1);
109 housekeeperLayout->setHorizontalSpacing(0);
110 housekeeperLayout->setVerticalSpacing(2);
112 if (widget.isNull() || widget->objectName().isEmpty()) {
115 if (!widget->windowTitle().isEmpty()) {
116 housekeeperLayout->addWidget(
117 l =
new QLabel(widget->windowTitle()),
120 currentAuxWidgets.insert(l);
122 housekeeperLayout->addWidget(widget, cnt++, 0);
124 if (widget != currentWidgetList.last()) {
125 housekeeperLayout->addWidget(s =
new QFrame(), cnt++, 0);
126 s->setFrameStyle(QFrame::HLine | QFrame::Sunken);
127 currentAuxWidgets.insert(s);
136 housekeeperLayout->setSizeConstraint(QLayout::SetMinAndMaxSize);
137 housekeeperLayout->invalidate();