QPalette pal; QPixmap map( "D:/WinParkUI/debug/Image/NewIcon/CommonBG-normal.jpg"); QBrush br( map ); pal.setBrush( frame->backgroundRole( ), br ); frame->setPalette( pal ); frame->setAutoFillBackground( true ); frame->show(); QDialog dlg; QPalette pal; QPixmap map( "D:/WinParkUI/debug/Image/NewIcon/CommonBG-normal.jpg"); QBrush br( map ); pal.setBrush(dlg.backgroundRole( ), br ); dlg.setPalette( pal ); dlg.setAutoFillBackground( true ); dlg.exec(); #endif } void MainWindow::on_pushButton_2_clicked() { QString strFile = "d:/MainBG.jpg"; QString strSql = "Update stoprd Set invideo1 = ? where stoprdid = 1"; QString strError; bool bRet = mysql.BlobWriteDb( strFile, strSql, strError ); bRet = true; }