#include #include #include #include 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); // 设置对话框的大小 } };