Implemented initial support for dropping multiple sections at the same time

This commit is contained in:
Uwe Kindler
2017-02-14 23:55:38 +01:00
parent 268c49af3b
commit 72fc9cd79a
7 changed files with 163 additions and 63 deletions

View File

@@ -97,17 +97,24 @@ QSplitter* findParentSplitter(class QWidget* w)
QSplitter* findImmediateSplitter(class QWidget* w)
{
QSplitter* sp = NULL;
QLayout* l = w->layout();
if (!l || l->count() <= 0)
return sp;
{
return nullptr;
}
QSplitter* sp = nullptr;
for (int i = 0; i < l->count(); ++i)
{
QLayoutItem* li = l->itemAt(0);
if (!li->widget())
{
continue;
if ((sp = dynamic_cast<QSplitter*>(li->widget())) != NULL)
}
if ((sp = dynamic_cast<QSplitter*>(li->widget())) != nullptr)
{
break;
}
}
return sp;
}