QHBoxLayout *hBox = new QHBoxLayout();
QLabel *labelTest = new QLabel(tr("test"));
hBox->addWidget(labelTest); hBox->addWidget(new QLabel("<font size='+1'><b><p align='center'>标题</p></b></font>")); hBox->addWidget(new QLabel("<font size='+1'><b><p align='center'>标题</p></b></font>", this)); hBox->addWidget(new QLabel("<font size='+1'><b><p align='center'>标题</p></b></font>", this)); QPushButton *testBtn = new QPushButton (tr("注销")); connect(testBtn, SIGNAL(clicked()), this, SLOT(onBtnTableDeleteClicked()));
hBox->addWidget(testBtn);
我想通过按钮的点击事件,获取到其他控件的值。例如:我点击注销按钮,要怎么获取labelTest的值 test? 谢谢