修正部分错误
This commit is contained in:
@@ -281,9 +281,9 @@ void VideoWidget::drawBg(QPainter *painter)
|
||||
painter->drawText(rect(), Qt::AlignCenter, bgText);
|
||||
} else {
|
||||
//居中绘制
|
||||
int pixX = rect().center().x() - bgImage.width() / 2;
|
||||
int pixY = rect().center().y() - bgImage.height() / 2;
|
||||
QPoint point(pixX, pixY);
|
||||
int x = rect().center().x() - bgImage.width() / 2;
|
||||
int y = rect().center().y() - bgImage.height() / 2;
|
||||
QPoint point(x, y);
|
||||
painter->drawImage(point, bgImage);
|
||||
}
|
||||
|
||||
@@ -301,9 +301,9 @@ void VideoWidget::drawImg(QPainter *painter, QImage img)
|
||||
} else {
|
||||
//按照比例自动居中绘制
|
||||
img = img.scaled(width() - offset, height() - offset, Qt::KeepAspectRatio);
|
||||
int pixX = rect().center().x() - img.width() / 2;
|
||||
int pixY = rect().center().y() - img.height() / 2;
|
||||
QPoint point(pixX, pixY);
|
||||
int x = rect().center().x() - img.width() / 2;
|
||||
int y = rect().center().y() - img.height() / 2;
|
||||
QPoint point(x, y);
|
||||
painter->drawImage(point, img);
|
||||
}
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ private slots:
|
||||
|
||||
signals:
|
||||
//播放成功
|
||||
void receivePlayOk();
|
||||
void receivePlayStart();
|
||||
//播放失败
|
||||
void receivePlayError();
|
||||
//播放结束
|
||||
|
||||
Reference in New Issue
Block a user