Qt控件设置Icon

ui.toolBtnPhone->setIcon(QIcon(":/QtWidgetsApplication2/resources/phonelogin.png"));
	ui.toolBtnPhone->setIconSize(QSize(60,60));
	ui.toolBtnPhone->setText("手机号");
	ui.toolBtnPhone->setToolButtonStyle(Qt::ToolButtonTextUnderIcon);
	ui.toolBtnPhone->setStyleSheet("border:none;background-color:white");
}

你可能感兴趣的:(qt,开发语言)