From 8beba8758b242c789250faa02c86c99358cbec13 Mon Sep 17 00:00:00 2001 From: feiyangqingyun Date: Mon, 29 Mar 2021 09:37:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E9=83=A8=E5=88=86=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- QWidgetDemo.pro | 2 +- nettool/head.h | 2 ++ videowidget/videowidget.cpp | 4 +++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/QWidgetDemo.pro b/QWidgetDemo.pro index 3e8dc6d..1dd4eb0 100644 --- a/QWidgetDemo.pro +++ b/QWidgetDemo.pro @@ -34,7 +34,7 @@ SUBDIRS += videowidget #通用视频控件 SUBDIRS += screenwidget #屏幕截图控件 SUBDIRS += imageswitch #图片开关控件 SUBDIRS += netserver #网络中转服务器 -SUBDIRS += base64 #图片文字base64互换 +SUBDIRS += base64 #图片文字base64互换 SUBDIRS += smoothcurve #平滑曲线 win32 { diff --git a/nettool/head.h b/nettool/head.h index 3b1b075..4a30c14 100644 --- a/nettool/head.h +++ b/nettool/head.h @@ -4,8 +4,10 @@ #if (QT_VERSION > QT_VERSION_CHECK(5,0,0)) #include +#ifdef websocket #include #endif +#endif #include "app.h" diff --git a/videowidget/videowidget.cpp b/videowidget/videowidget.cpp index bac49f4..1c4af0c 100644 --- a/videowidget/videowidget.cpp +++ b/videowidget/videowidget.cpp @@ -274,7 +274,9 @@ void VideoWidget::drawBorder(QPainter *painter) void VideoWidget::drawBg(QPainter *painter) { painter->save(); - painter->fillRect(rect(), bgColor); + if (bgColor != Qt::transparent) { + painter->fillRect(rect(), bgColor); + } //背景图片为空则绘制文字,否则绘制背景图片 if (bgImage.isNull()) {