forked from brmlab/brmbar-github
attempt to update for python3
This commit is contained in:
parent
5f9292fd02
commit
fb206b0c9f
1 changed files with 19 additions and 9 deletions
|
@ -3,7 +3,11 @@
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
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
|
from brmbar import Database
|
||||||
|
|
||||||
|
@ -230,13 +234,19 @@ currency = shop.currency
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
||||||
|
|
||||||
app = QtGui.QApplication(sys.argv)
|
app = QGuiApplication(sys.argv)
|
||||||
view = QtDeclarative.QDeclarativeView()
|
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 = QtDeclarative.QDeclarativeView()
|
||||||
|
#
|
||||||
view.showFullScreen()
|
#ctx = view.rootContext()
|
||||||
app.exec_()
|
#ctx.setContextProperty('shop', ShopAdapter())
|
||||||
|
engine.rootObjects()[0].setProperty('shop', ShopAdapter())
|
||||||
|
#
|
||||||
|
#view.setSource('brmbar-gui-qt4/main.qml')
|
||||||
|
#
|
||||||
|
#view.showFullScreen()
|
||||||
|
sys.exit(app.exec())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue