#pragma once #include #include class CommandEdit : public QLineEdit { Q_OBJECT std::vector commandHistory; int historyIndex = 0; void executeCommand(); public: CommandEdit(QWidget* parent = nullptr); ~CommandEdit(); void keyPressEvent(QKeyEvent *) override; };