新增大窗口播放视频按键,窗口大小根据解码视频分辨率自动调整,关掉大窗口回到原来位置播放视频
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// FocusWindow.h
|
||||
#include <QDialog>
|
||||
#include <QVBoxLayout>
|
||||
#include <QLabel>
|
||||
@@ -8,12 +9,13 @@ class FocusWindowDialog : public QDialog
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
QLabel* videoDisplayLabel;
|
||||
FocusWindowDialog(QWidget* parent = nullptr, const QSize& labelSize = QSize(480, 640)) : QDialog(parent)
|
||||
{
|
||||
QVBoxLayout* layout = new QVBoxLayout(this);
|
||||
QLabel* label = new QLabel("1111 This is a new window opened by clicking the new button.", this);
|
||||
label->setFixedSize(labelSize); // 设置QLabel的固定大小
|
||||
layout->addWidget(label);
|
||||
videoDisplayLabel = new QLabel(this);
|
||||
videoDisplayLabel->setFixedSize(labelSize); // 设置QLabel的固定大小
|
||||
layout->addWidget(videoDisplayLabel);
|
||||
|
||||
QPushButton* closeButton = new QPushButton("Close", this);
|
||||
layout->addWidget(closeButton);
|
||||
|
||||
Reference in New Issue
Block a user