9 |
9 |
10 from PyQt6.QtCore import pyqtSlot |
10 from PyQt6.QtCore import pyqtSlot |
11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
11 from PyQt6.QtWidgets import QDialog, QDialogButtonBox |
12 from PyQt6.QtSql import QSqlDatabase |
12 from PyQt6.QtSql import QSqlDatabase |
13 |
13 |
14 from E5Gui.E5PathPicker import E5PathPickerModes |
14 from E5Gui.EricPathPicker import EricPathPickerModes |
15 |
15 |
16 from .Ui_SqlConnectionDialog import Ui_SqlConnectionDialog |
16 from .Ui_SqlConnectionDialog import Ui_SqlConnectionDialog |
17 |
17 |
18 |
18 |
19 class SqlConnectionDialog(QDialog, Ui_SqlConnectionDialog): |
19 class SqlConnectionDialog(QDialog, Ui_SqlConnectionDialog): |
27 @param parent reference to the parent widget (QWidget) |
27 @param parent reference to the parent widget (QWidget) |
28 """ |
28 """ |
29 super().__init__(parent) |
29 super().__init__(parent) |
30 self.setupUi(self) |
30 self.setupUi(self) |
31 |
31 |
32 self.databasePicker.setMode(E5PathPickerModes.OPEN_FILE_MODE) |
32 self.databasePicker.setMode(EricPathPickerModes.OPEN_FILE_MODE) |
33 |
33 |
34 self.okButton = self.buttonBox.button( |
34 self.okButton = self.buttonBox.button( |
35 QDialogButtonBox.StandardButton.Ok) |
35 QDialogButtonBox.StandardButton.Ok) |
36 |
36 |
37 drivers = QSqlDatabase.drivers() |
37 drivers = QSqlDatabase.drivers() |