新增代码

This commit is contained in:
feiyangqingyun
2021-11-09 20:40:00 +08:00
parent ad847c7065
commit 17b7c88f98
24 changed files with 1269 additions and 451 deletions

Binary file not shown.

View File

@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>500</width>
<height>300</height>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
@@ -65,9 +65,6 @@
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>

View File

@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
a.setFont(QFont("Microsoft Yahei", 9));
#if (QT_VERSION <= QT_VERSION_CHECK(5,0,0))
#if (QT_VERSION < QT_VERSION_CHECK(5,0,0))
#if _MSC_VER
QTextCodec *codec = QTextCodec::codecForName("gbk");
#else

5
videowidget/main.qrc Normal file
View File

@@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>font/iconfont.ttf</file>
</qresource>
</RCC>

View File

@@ -179,7 +179,11 @@ void VideoWidget::resizeEvent(QResizeEvent *)
//flowPanel->setGeometry(borderWidth, this->height() - height - borderWidth, this->width() - (borderWidth * 2), height);
}
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
void VideoWidget::enterEvent(QEnterEvent *)
#else
void VideoWidget::enterEvent(QEvent *)
#endif
{
//这里还可以增加一个判断,是否获取了焦点的才需要显示
//if (this->hasFocus()) {}

View File

@@ -24,9 +24,9 @@ class QTimer;
#ifdef quc
class Q_DECL_EXPORT VideoWidget : public QWidget
#else
#else
class VideoWidget : public QWidget
#endif
#endif
{
Q_OBJECT
@@ -89,7 +89,11 @@ public:
protected:
void resizeEvent(QResizeEvent *);
#if (QT_VERSION >= QT_VERSION_CHECK(6,0,0))
void enterEvent(QEnterEvent *);
#else
void enterEvent(QEvent *);
#endif
void leaveEvent(QEvent *);
void dropEvent(QDropEvent *event);
void dragEnterEvent(QDragEnterEvent *event);

View File

@@ -15,3 +15,5 @@ HEADERS += frmvideowidget.h
HEADERS += videowidget.h
FORMS += frmvideowidget.ui
RESOURCES += main.qrc