#ifndef DIALOG_H #define DIALOG_H #include QT_BEGIN_NAMESPACE namespace Ui { class Dialog; } QT_END_NAMESPACE class Dialog : public QDialog { Q_OBJECT public: Dialog(QWidget *parent = nullptr); ~Dialog(); int showPrompt(const QString& prompt); QString getInput(); private slots: void on_txtInput_returnPressed(); private: Ui::Dialog *ui; // QWidget interface protected: void closeEvent(QCloseEvent *event) override; }; #endif // DIALOG_H