5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to generate code for a Qt5 dialog. |
7 Module implementing a dialog to generate code for a Qt5 dialog. |
8 """ |
8 """ |
9 |
9 |
10 |
|
11 import sys |
10 import sys |
12 import os |
11 import os |
13 import json |
12 import json |
14 |
13 |
15 from PyQt5.QtCore import ( |
14 from PyQt5.QtCore import ( |
16 pyqtSlot, Qt, QMetaObject, QRegExp, QSortFilterProxyModel, QProcess, |
15 pyqtSlot, Qt, QMetaObject, QRegularExpression, QSortFilterProxyModel, |
17 QProcessEnvironment |
16 QProcess, QProcessEnvironment |
18 ) |
17 ) |
19 from PyQt5.QtGui import QStandardItemModel, QStandardItem, QBrush, QColor |
18 from PyQt5.QtGui import QStandardItemModel, QStandardItem, QBrush, QColor |
20 from PyQt5.QtWidgets import QDialog, QDialogButtonBox |
19 from PyQt5.QtWidgets import QDialog, QDialogButtonBox |
21 |
20 |
22 |
21 |
589 """ |
588 """ |
590 Private slot called, when thext of the filter edit has changed. |
589 Private slot called, when thext of the filter edit has changed. |
591 |
590 |
592 @param text changed text (string) |
591 @param text changed text (string) |
593 """ |
592 """ |
594 re = QRegExp(text, Qt.CaseInsensitive, QRegExp.RegExp2) |
593 rx = QRegularExpression(text, QRegularExpression.CaseInsensitiveOption) |
595 self.proxyModel.setFilterRegExp(re) |
594 self.proxyModel.setFilterRegularExpression(rx) |
596 |
595 |
597 @pyqtSlot() |
596 @pyqtSlot() |
598 def on_newButton_clicked(self): |
597 def on_newButton_clicked(self): |
599 """ |
598 """ |
600 Private slot called to enter the data for a new dialog class. |
599 Private slot called to enter the data for a new dialog class. |