//常规办法 ui->label->setText("hello"); //取巧办法 ui->label->setProperty("text", "hello"); //属性大法 ui->label->setStyleSheet("qproperty-text:hello;");