//设置字号
QFont ft;
ft.setPointSize(20);
ui.label5->setFont(ft);
//设置颜色
QPalette pa;
pa.setColor(QPalette::WindowText,Qt::red);
ui.label5->setPalette(pa);
QString qstr;
string str = "字符串";
qstr = (QString(QString::fromLocal8Bit(str.c_str())));
ui.label7->setText(qstr );