nocturne
nocturne

Reputation: 647

Qt - overlap labels in QVBoxLayout

I am trying to make labels overlap each other in QVBoxLayout like this:

this->layout = new QGridLayout;
this->layout->addLayout(new QVBoxLayout, 1, 0);

for (int j = 0; j < 7; j++) {
    ClickableLabel *label = new ClickableLabel();

    auto stack = this->layout->findChildren<QVBoxLayout*>();
    stack[0]->addWidget(label);
    stack[0]->setAlignment(Qt::AlignTop);

    button->setGeometry(10000, 100, 0, 0);
}

Now the setGeometry is doing nothing. So my question is: Can I achieve overlaping labels in QVBoxLayout?

Upvotes: 0

Views: 537

Answers (1)

MarianD
MarianD

Reputation: 14131

No, you can't achieve overlaping labels in QVBoxLayout.

Upvotes: 1

Related Questions