Compare commits

...
Sign in to create a new pull request.

1 commit
master ... py3

Author SHA1 Message Date
TMA
fb206b0c9f attempt to update for python3 2025-04-20 14:50:32 +02:00

View file

@ -3,7 +3,11 @@
import sys
import subprocess
from PySide import QtCore, QtGui, QtDeclarative
#from PySide import QtCore, QtGui, QtDeclarative
from PySide6.QtGui import QGuiApplication
from PySide6.QtQml import QQmlApplicationEngine
from PySide6 import QtCore
# QtGui, QtDeclarative
from brmbar import Database
@ -230,13 +234,19 @@ currency = shop.currency
db.commit()
app = QtGui.QApplication(sys.argv)
view = QtDeclarative.QDeclarativeView()
app = QGuiApplication(sys.argv)
engine = QQmlApplicationEngine()
engine.quit.connect(app.quit)
engine.load('brmbar-gui-qt4/main.qml')
ctx = view.rootContext()
ctx.setContextProperty('shop', ShopAdapter())
view.setSource('brmbar-gui-qt4/main.qml')
view.showFullScreen()
app.exec_()
#view = QtDeclarative.QDeclarativeView()
#
#ctx = view.rootContext()
#ctx.setContextProperty('shop', ShopAdapter())
engine.rootObjects()[0].setProperty('shop', ShopAdapter())
#
#view.setSource('brmbar-gui-qt4/main.qml')
#
#view.showFullScreen()
sys.exit(app.exec())