SL100_FactoryTestTool/FactoryTestTool/SourceCode/Widget/FocusWindow.h

26 lines
767 B
C
Raw Normal View History

2024-08-01 01:17:17 +00:00
#include <QDialog>
#include <QVBoxLayout>
#include <QLabel>
#include <QPushButton>
class NewButtonDialog : public QDialog
{
Q_OBJECT
public:
NewButtonDialog(QWidget* parent = nullptr) : QDialog(parent)
{
QVBoxLayout* layout = new QVBoxLayout(this);
QLabel* label = new QLabel("This is a new window opened by clicking the new button.", this);
layout->addWidget(label);
QPushButton* closeButton = new QPushButton("Close", this);
layout->addWidget(closeButton);
connect(closeButton, &QPushButton::clicked, this, &NewButtonDialog::accept);
setLayout(layout);
setWindowTitle("SL100 视频播放窗口");
resize(480, 640); // 设置对话框的大小
}
};