Skip to content

Commit 2119c3d

Browse files
committed
feat: close with esc button
1 parent c78394d commit 2119c3d

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/permissiondialog.h

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,25 @@ namespace Ui {
99
class PermissionDialog;
1010
}
1111

12-
class PermissionDialog : public QWidget
13-
{
14-
Q_OBJECT
12+
class PermissionDialog : public QWidget {
13+
Q_OBJECT
1514

1615
public:
17-
explicit PermissionDialog(QWidget *parent = nullptr);
18-
~PermissionDialog();
16+
explicit PermissionDialog(QWidget *parent = nullptr);
17+
~PermissionDialog();
1918

2019
signals:
21-
void webPageFeatureChanged(QWebEnginePage::Feature feature);
20+
void webPageFeatureChanged(QWebEnginePage::Feature feature);
2221

22+
protected slots:
23+
void keyPressEvent(QKeyEvent *e);
2324
private slots:
24-
void addToFeaturesTable(QWebEnginePage::Feature feature, QString &featureName);
25+
void addToFeaturesTable(QWebEnginePage::Feature feature,
26+
QString &featureName);
27+
2528
private:
26-
Ui::PermissionDialog *ui;
27-
QSettings settings;
29+
Ui::PermissionDialog *ui;
30+
QSettings settings;
2831
};
2932

3033
#endif // PERMISSIONDIALOG_H

0 commit comments

Comments
 (0)