#pragma once #include #include #include namespace Ui { class AuthorityDialog; } class AuthorityDialog : public QDialog { Q_OBJECT public: explicit AuthorityDialog(QWidget *parent = nullptr); ~AuthorityDialog(); bool isAuthorized(); // 验证是否授权 void show(); private slots: void showEvent(QShowEvent *event) override; //void resizeEvent(QResizeEvent *event) override; private: Ui::AuthorityDialog *ui; QRegExp m_regExp; QValidator *m_validator; };