29 lines
908 B
C++
29 lines
908 B
C++
// FocusWindow.h
|
|
#include <QDialog>
|
|
#include <QVBoxLayout>
|
|
#include <QLabel>
|
|
#include <QPushButton>
|
|
|
|
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);
|
|
videoDisplayLabel = new QLabel(this);
|
|
videoDisplayLabel->setFixedSize(labelSize); // 设置QLabel的固定大小
|
|
layout->addWidget(videoDisplayLabel);
|
|
|
|
QPushButton* closeButton = new QPushButton("Close", this);
|
|
layout->addWidget(closeButton);
|
|
connect(closeButton, &QPushButton::clicked, this, &FocusWindowDialog::accept);
|
|
|
|
setLayout(layout);
|
|
setWindowTitle("SL100 视频播放窗口");
|
|
//resize(500, 700); // 设置对话框的大小
|
|
}
|
|
};
|