新增代码
This commit is contained in:
BIN
videowidget/font/iconfont.ttf
Normal file
BIN
videowidget/font/iconfont.ttf
Normal file
Binary file not shown.
@@ -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>
|
||||
|
||||
@@ -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
5
videowidget/main.qrc
Normal file
@@ -0,0 +1,5 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>font/iconfont.ttf</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -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()) {}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -15,3 +15,5 @@ HEADERS += frmvideowidget.h
|
||||
HEADERS += videowidget.h
|
||||
|
||||
FORMS += frmvideowidget.ui
|
||||
|
||||
RESOURCES += main.qrc
|
||||
|
||||
Reference in New Issue
Block a user