QObject::connect(ui->pushButton_4, SIGNAL(pressed()),ui->label_2, SLOT(hide()));
這樣,當我按下按鈕,label會隱藏
QObject::connect(ui->pushButton_4, SIGNAL(pressed()),ui->label_2, SLOT(setText("TEST")));
為什label不會改成TEST
我直接從qt creator,把button連到label時,看不到setText(),hide()是有看到,好奇怪窩
有大大能幫忙嗎?thanks