Qt在ui中使用代码添加新的控件

QLabel* label = new QLabel(ui->centralWidget);
原文地址:https://www.cnblogs.com/coolbear/p/5903587.html