#ifndef DELUSERWINDOW_H #define DELUSERWINDOW_H #include #include #include #include #include #include class DelUserWindow : public QDialog { Q_OBJECT public: explicit DelUserWindow(QWidget* parent = nullptr) : QDialog(parent) { setWindowTitle("Delete User"); QVBoxLayout* layout = new QVBoxLayout(this); QLabel* label = new QLabel("输入要删除的用户ID:", this); layout->addWidget(label); userInput = new QLineEdit(this); layout->addWidget(userInput); QPushButton* deleteButton = new QPushButton("删除用户", this); layout->addWidget(deleteButton); qDebug() << "------------- DelUserWindow"; connect(deleteButton, &QPushButton::clicked, this, &DelUserWindow::onDeleteButtonClicked); } QString getUserInput() const { return userInput->text(); } private slots: void onDeleteButtonClicked() { accept(); } private: QLineEdit* userInput; }; #endif // DELUSERWINDOW_H