Hello!
The code compiles and there is no error during execution.
Here some code:
QGridLayout* const glayout
= dynamic_cast<QGridLayout
*>
(form
->layout
());
if (glayout)
{
QLayoutItem* const last_item
= glayout
->itemAtPosition
(glayout
->rowCount
()-1,
0);
if (last_item && dynamic_cast<QHBoxLayout*>(last_item))
{
qDebug() << "Moving...";
glayout->removeItem(last_item);
ui->verticalLayout_frame_edit->insertItem(1, last_item);
}
}
}
QGridLayout* const glayout = dynamic_cast<QGridLayout*>(form->layout());
if (glayout)
{
QLayoutItem* const last_item = glayout->itemAtPosition(glayout->rowCount()-1, 0);
if (last_item && dynamic_cast<QHBoxLayout*>(last_item))
{
qDebug() << "Moving...";
glayout->removeItem(last_item);
ui->verticalLayout_frame_edit->insertItem(1, last_item);
}
}
}
To copy to clipboard, switch view to plain text mode
Should this be enough to move the layout with all its children or do I have to do something special
to move the children too?
And I tried several "update()" calls...
Regards
Sven
Bookmarks