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
?
不,您不能在QVBoxLayout
实现重叠标签。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.