Einloggen funktioniert
This commit is contained in:
5
main.py
5
main.py
@@ -9,6 +9,8 @@ from lib.DB.BusinessModel import BusinessModel
|
||||
import rc_pyqcrm
|
||||
import rc_qml
|
||||
from lib.DB.DbManager import DbManager
|
||||
from lib.DB.UserManager import UserManager
|
||||
|
||||
|
||||
# [pyqcrm]
|
||||
# program-name=""
|
||||
@@ -43,6 +45,7 @@ if __name__ == "__main__":
|
||||
config = ConfigLoader()
|
||||
|
||||
|
||||
|
||||
if not config.getConfig():
|
||||
bad_config = True
|
||||
bm = False
|
||||
@@ -50,12 +53,14 @@ if __name__ == "__main__":
|
||||
dbconf = config.getConfig()['database']
|
||||
DbManager(dbconf)
|
||||
bm = BusinessModel(DbManager().getConnection(), ["roleid", "username", "gecos"])
|
||||
user = UserManager()
|
||||
|
||||
#print(con is con2)
|
||||
|
||||
engine.rootContext().setContextProperty("bm", bm)
|
||||
engine.rootContext().setContextProperty("bad_config", bad_config) # print(f"Fehler: {i}")
|
||||
engine.rootContext().setContextProperty("config", config)
|
||||
engine.rootContext().setContextProperty("loggedin_user", user)
|
||||
engine.load(qml_file)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user