第10讲 Qt数据库.ppt

1、弹出对话框 QMessageBox::critical(NULL, tr(未输入帐号), tr(请您先输入账号后再登录!), QMessageBox::Yes , QMessageBox::Yes); QMessageBox::information(NULL, tr(恭喜), tr(密码正确), QMessageBox::Yes, QMessageBox::Yes); 2、设置背景图片 QPixmap image1(res/background_blue.png); QPixmap image2 = image1.scaled(this-width(),this-height()); QPalette palette; palette.setBrush(this-backgroundRole(),QBrush(image2)); this-setPalette(palette); 3、 //设置标题栏隐藏 this-setWindowFlags(Qt::FramelessWindowHint); 知识回顾 PushButton背景透明 ui-pushButton_2-setFlat(true); //设置扁平 ui-pushButton-setStyleSheet(QPushButton{background-color: transpare

文档评论(0)

1亿VIP精品文档

相关文档