Reputation: 933
I'm using QVboxLayout to achieve this. The following code below is what I'm currently trying:
BubbleLabel *label = new BubbleLabel();
label->setText(text);
ui->verticalLayout->insertWidget(-1, label);
Instead of from buttom to the top, the result was from top to buttom:
How can I achieve that?
Upvotes: 0
Views: 42
Reputation: 1231
Insert works with the 'placement location' as index. You should use:
ui->verticalLayout->insertWidget(0, label);
Upvotes: 1