lundi 26 novembre 2018

Remove a frame from a QWidget in a QStackedLayout

How to remove an internal frame from a QWidget that was added to a QWidget::layout()? I was trying to set setContetntMargins(0,0,0,0); but this did not work, but if I set setContetntMargins(10,10,10,10); I can see changes.

void riseUpWidget(QWidget* widget)
{
    if (layout()->indexOf(widget) == -1)
    {
        layout()->addWidget(widget);
    }

    layout()->setCurrentWidget(widget);
}

QStackedLayout* layout() const
{
    return static_cast<QStackedLayout*>(QWidget::layout());
}

enter image description here

Aucun commentaire:

Enregistrer un commentaire