You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mainwidget.h 452B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef MAINWIDGET_H
  2. #define MAINWIDGET_H
  3. #include <QDialog>
  4. #include <QKeyEvent>
  5. namespace Ui {
  6. class MainWidget;
  7. }
  8. class MainWidget : public QDialog
  9. {
  10. Q_OBJECT
  11. public:
  12. explicit MainWidget(QWidget *parent = 0);
  13. ~MainWidget();
  14. void setExitOnLostFocus(bool exit);
  15. protected:
  16. bool event(QEvent* e);
  17. void keyReleaseEvent(QKeyEvent* e);
  18. private:
  19. Ui::MainWidget *ui;
  20. bool exitOnLostFocus;
  21. };
  22. #endif // MAINWIDGET_H