commit
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@ __pycache__/pyqt5_gui.cpython-312.pyc
|
|||||||
ht-multi.code-workspace
|
ht-multi.code-workspace
|
||||||
ht-multi_Win.code-workspace
|
ht-multi_Win.code-workspace
|
||||||
ht-multi.code-workspace
|
ht-multi.code-workspace
|
||||||
|
meine.db
|
||||||
|
|||||||
@@ -1,10 +1,21 @@
|
|||||||
from PySide6.QtWidgets import QApplication, QMainWindow
|
from PySide6.QtWidgets import QApplication, QMainWindow
|
||||||
|
from PySide6 import QtSql
|
||||||
from pyqt5_gui import Ui_MainWindow
|
from pyqt5_gui import Ui_MainWindow
|
||||||
|
|
||||||
class Frm_main(QMainWindow, Ui_MainWindow):
|
class Frm_main(QMainWindow, Ui_MainWindow):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
self.setupUi(self)
|
self.setupUi(self)
|
||||||
|
mod_geraete = QtSql.QSqlRelationalTableModel()
|
||||||
|
mod_geraete.setTable("Geraete")
|
||||||
|
mod_geraete.setRelation(2, QtSql.QSqlRelation("Kunden", "Kunden_Index", "Kunden_Name"))
|
||||||
|
mod_geraete.setRelation(6, QtSql.QSqlRelation("Pruefung", "Pruefung_Ablauf", "Pruefung_Name"))
|
||||||
|
mod_geraete.select()
|
||||||
|
self.tbl_geraete.setModel(mod_geraete)
|
||||||
|
|
||||||
|
db = QtSql.QSqlDatabase.addDatabase("QSQLITE")
|
||||||
|
db.setDatabaseName("meine.db")
|
||||||
|
|
||||||
|
|
||||||
app = QApplication()
|
app = QApplication()
|
||||||
frm_main = Frm_main()
|
frm_main = Frm_main()
|
||||||
|
|||||||
Reference in New Issue
Block a user