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()) {