特牛网址导航

QT 布局时使用 addStretch 可伸缩设置-CSDN博客

网友收藏
文章浏览阅读7.6k次。今天在使用addStretch,布局的时候,发现addStretch竟然是可以平均分配的,有意思。比如:QVBoxLayout *buttonLayout = new QVBoxLayout; buttonLayout->addStretch(1); buttonLayout->addWidget(Button1); buttonLayout->addStretch(1)