1.图片缩放
QPixmap *pBackBuffer = new QPixmap(m_newShopList->at(i).shopImgUrl); QPixmap qimage; qimage = pBackBuffer->scaled(QSize(80,70));
2.QListWidget Image 横向显示icon
QListWidget * listWidget = ui -> listWidget_store_images ; listWidget->setViewMode(QListView::IconMode); listWidget->setFlow(QListView::LeftToRight); listWidget->setMovement(QListView::Static); listWidget->setWrapping(false); listWidget->setStyleSheet("background:rgba(0,0,0,0%);"); listWidget->setIconSize(QSize(70,70));
3.Label 文字透明并居中
ui->label_xqstore_header->setStyleSheet("background:rgba(0,0,0,0%);font: 75 12pt;");//设置label背景透明 ui->label_xqstore_header->setAlignment(Qt::AlignCenter);//设置居中