加入了思科算法,连接上了存图
This commit is contained in:
@@ -40,7 +40,8 @@ public:
|
||||
scene->clear();
|
||||
scene->addWidget(imgLabel);
|
||||
imgLabel->setMaximumSize(9999, 9999);
|
||||
this->setStyleSheet("QGraphicsView {"
|
||||
this->setObjectName("SonGraphicsView");
|
||||
this->setStyleSheet("QGraphicsView#SonGraphicsView {"
|
||||
"background: transparent;"
|
||||
"background-image: url(:/topBar/icon/waitting.png);"
|
||||
"background-repeat: no-repeat;"
|
||||
@@ -63,6 +64,7 @@ public:
|
||||
void setImg(QPixmap& pixmap)
|
||||
{
|
||||
showImg(pixmap);
|
||||
|
||||
}
|
||||
void resetImage()
|
||||
{
|
||||
@@ -169,7 +171,9 @@ private:
|
||||
QRect rect = img.rect();
|
||||
imageWidth = rect.width();
|
||||
imageHeight = rect.height();
|
||||
|
||||
imgLabel->setFixedSize(imageWidth, imageHeight);
|
||||
imgLabel->setPixmap(img);
|
||||
setSceneRect(rect);
|
||||
this->fitInView(scene->itemsBoundingRect(), Qt::KeepAspectRatio);
|
||||
mutex.unlock();
|
||||
|
||||
Reference in New Issue
Block a user