Skip to content

Commit

Permalink
修复视频缩放锯齿问题
Browse files Browse the repository at this point in the history
  • Loading branch information
sonichy committed Aug 24, 2020
1 parent 3b591ea commit 7628397
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Binary file modified HTYMP
Binary file not shown.
4 changes: 2 additions & 2 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(player, SIGNAL(mediaStatusChanged(QMediaPlayer::MediaStatus)), SLOT(mediaStatusChange(QMediaPlayer::MediaStatus)));
connect(player, &QMediaPlayer::bufferStatusChanged, [=](int i){
if (i < 100) {
ui->statusBar->showMessage("缓冲 " + QString::number(i)+ "%");
ui->statusBar->showMessage("正在缓冲 " + QString::number(i)+ "%");
} else {
ui->statusBar->showMessage("");
}
Expand Down Expand Up @@ -1280,7 +1280,7 @@ void MainWindow::treeWidgetItemDoubleClicked(QTreeWidgetItem *item, int column)
qDebug() << column << item->text(column) << item->toolTip(column);
if (item->toolTip(0).endsWith(".m3u8")) {
setWindowTitle(item->parent()->text(0) + item->text(0));
ui->statusBar->showMessage("播放 " + item->toolTip(0), 1000);
ui->statusBar->showMessage("播放 " + item->toolTip(0));
player->setMedia(QUrl(item->toolTip(0)));
player->play();
}
Expand Down
5 changes: 4 additions & 1 deletion mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<widget class="QWidget" name="">
<widget class="QWidget" name="layoutWidget">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
Expand All @@ -70,6 +70,9 @@
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="renderHints">
<set>QPainter::SmoothPixmapTransform|QPainter::TextAntialiasing</set>
</property>
</widget>
</item>
<item>
Expand Down

0 comments on commit 7628397

Please sign in to comment.