QRC for QML resources
This commit is contained in:
2
gui/qmldir
Normal file
2
gui/qmldir
Normal file
@@ -0,0 +1,2 @@
|
||||
module TopBar
|
||||
TopBar 1.0 TopBar.qml
|
||||
6
main.py
6
main.py
@@ -3,6 +3,7 @@ import sys
|
||||
from pathlib import Path
|
||||
from PySide6.QtGui import QGuiApplication
|
||||
from PySide6.QtQml import QQmlApplicationEngine
|
||||
from PySide6.QtCore import QResource
|
||||
from lib.ConfigLoader import ConfigLoader
|
||||
from lib.DataBase import DataBase
|
||||
import rc_pyqcrm
|
||||
@@ -36,14 +37,19 @@ def testConnection():
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# QResource.registerResource("qml.qrc")
|
||||
app = QGuiApplication(sys.argv)
|
||||
engine = QQmlApplicationEngine()
|
||||
engine.addImportPath("qrc:/gui");
|
||||
|
||||
bad_config = False
|
||||
|
||||
|
||||
|
||||
qml_file = Path(__file__).resolve().parent / "gui/main.qml"
|
||||
|
||||
# qml_file = ":/gui/TopBar.qml"
|
||||
|
||||
config = ConfigLoader()
|
||||
|
||||
con = testConnection()
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
"gui/Dashboard.qml",
|
||||
"js/qmldict.js",
|
||||
"lib/Vermasseln.py",
|
||||
"gui/TopBar.qml",
|
||||
"gui/CustomerTables.qml",
|
||||
"gui/SearchBar.qml",
|
||||
"gui/test.qml",
|
||||
@@ -16,6 +15,8 @@
|
||||
"gui/EmployeTables.qml",
|
||||
"gui/AddCustomer.qml",
|
||||
"pyqcrm.qrc",
|
||||
"qml.qrc"
|
||||
"qml.qrc",
|
||||
"gui/qmldir",
|
||||
"gui/TopBar.qml"
|
||||
]
|
||||
}
|
||||
|
||||
2
qml.qrc
2
qml.qrc
@@ -1,5 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>gui/qmldir</file>
|
||||
<file>gui/TopBar.qml</file>
|
||||
</qresource>
|
||||
<qresource prefix="/gui"/>
|
||||
</RCC>
|
||||
|
||||
13
rc_qml.py
13
rc_qml.py
@@ -36,6 +36,11 @@ R\xc2\x99\x15\xe6\xba7\xf5\xb1\x85]\xd9d4\xe6\x0c\
|
||||
6\x9e\x93%!~\x0d`\x01_\xdb(\x5c\xa0\xa7\x82\
|
||||
\x03\xf0\xd6\xb8\x0d\x97\xd8n\x056\x87\xb4\xaf%\xb4\x0d\
|
||||
\x83\xfb\x1b\xe6\x8aD\x22w*\
|
||||
\x00\x00\x00$\
|
||||
m\
|
||||
odule TopBar\x0aTop\
|
||||
Bar 1.0 TopBar.q\
|
||||
ml\x0a\
|
||||
"
|
||||
|
||||
qt_resource_name = b"\
|
||||
@@ -47,13 +52,19 @@ qt_resource_name = b"\
|
||||
\x08\x8e<\xbc\
|
||||
\x00T\
|
||||
\x00o\x00p\x00B\x00a\x00r\x00.\x00q\x00m\x00l\
|
||||
\x00\x06\
|
||||
\x07\x84+\x02\
|
||||
\x00q\
|
||||
\x00m\x00l\x00d\x00i\x00r\
|
||||
"
|
||||
|
||||
qt_resource_struct = b"\
|
||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x01\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\x02\
|
||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\x00\x00\x00\x02\
|
||||
\x00\x00\x00\x00\x00\x00\x00\x00\
|
||||
\x00\x00\x00&\x00\x00\x00\x00\x00\x01\x00\x00\x01\xbe\
|
||||
\x00\x00\x01\x93'\x9ft\xf1\
|
||||
\x00\x00\x00\x0c\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||
\x00\x00\x01\x93'4I\xe1\
|
||||
"
|
||||
|
||||
Reference in New Issue
Block a user