#ifndef ABSTRACTDIALOG_H #define ABSTRACTDIALOG_H #include class QGridLayout; class QDialogButtonBox; class QVBoxLayout; class AbstractDialog : public QDialog { Q_OBJECT public: AbstractDialog(QWidget* parent = nullptr); virtual void createContent() = 0; /// QDialog interface public slots: void show(); void accept() override; void reject() override; protected: void centerInParent(); protected: QWidget* m_contentContainer; QVBoxLayout* m_outerLayout; QDialogButtonBox* m_buttonBox = nullptr; void closeEvent(QCloseEvent* event) override; }; #endif // ABSTRACTDIALOG_H