[英]Qt - overlap labels in QVBoxLayout
我試圖像這樣在QVBoxLayout
中使標簽彼此重疊:
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);
}
現在, setGeometry
不執行任何操作。 所以我的問題是:我可以在QVBoxLayout
實現重疊標簽嗎?
不,您不能在QVBoxLayout
實現重疊標簽。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.