Sun, 09 Apr 2023 16:01:57 +0300
I forgot to add files again... this time it's modelsubwindow.h
src/modelsubwindow.h | file | annotate | diff | comparison | revisions |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/modelsubwindow.h Sun Apr 09 16:01:57 2023 +0300 @@ -0,0 +1,21 @@ +#pragma once +#include <QMdiSubWindow> +#include <QCloseEvent> +#include "src/basics.h" + +class ModelSubWindow : public QMdiSubWindow +{ + Q_OBJECT +public: + const ModelId modelId; + explicit ModelSubWindow(ModelId modelId, QWidget* widget = nullptr) : + QMdiSubWindow{widget}, + modelId{modelId} + { + } +protected: + void closeEvent(QCloseEvent* event) override + { + event->ignore(); + } +};