Resources for QML assets
This commit is contained in:
6
assets/qml.qrc
Normal file
6
assets/qml.qrc
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<RCC>
|
||||||
|
<qresource prefix="/gui">
|
||||||
|
<file>qmldir</file>
|
||||||
|
<file>TopBar.qml</file>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
module TopBar
|
module PyqMenu
|
||||||
TopBar 1.0 TopBar.qml
|
TopBar 1.0 TopBar.qml
|
||||||
@@ -36,11 +36,11 @@ R\xc2\x99\x15\xe6\xba7\xf5\xb1\x85]\xd9d4\xe6\x0c\
|
|||||||
6\x9e\x93%!~\x0d`\x01_\xdb(\x5c\xa0\xa7\x82\
|
6\x9e\x93%!~\x0d`\x01_\xdb(\x5c\xa0\xa7\x82\
|
||||||
\x03\xf0\xd6\xb8\x0d\x97\xd8n\x056\x87\xb4\xaf%\xb4\x0d\
|
\x03\xf0\xd6\xb8\x0d\x97\xd8n\x056\x87\xb4\xaf%\xb4\x0d\
|
||||||
\x83\xfb\x1b\xe6\x8aD\x22w*\
|
\x83\xfb\x1b\xe6\x8aD\x22w*\
|
||||||
\x00\x00\x00$\
|
\x00\x00\x00%\
|
||||||
m\
|
m\
|
||||||
odule TopBar\x0aTop\
|
odule PyqMenu\x0aTo\
|
||||||
Bar 1.0 TopBar.q\
|
pBar 1.0 TopBar.\
|
||||||
ml\x0a\
|
qml\x0a\
|
||||||
"
|
"
|
||||||
|
|
||||||
qt_resource_name = b"\
|
qt_resource_name = b"\
|
||||||
@@ -64,7 +64,7 @@ qt_resource_struct = b"\
|
|||||||
\x00\x00\x00\x00\x00\x02\x00\x00\x00\x02\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\
|
||||||
\x00\x00\x00&\x00\x00\x00\x00\x00\x01\x00\x00\x01\xbe\
|
\x00\x00\x00&\x00\x00\x00\x00\x00\x01\x00\x00\x01\xbe\
|
||||||
\x00\x00\x01\x93'\x9ft\xf1\
|
\x00\x00\x01\x93+\x0f\xdbn\
|
||||||
\x00\x00\x00\x0c\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\
|
\x00\x00\x00\x0c\x00\x04\x00\x00\x00\x01\x00\x00\x00\x00\
|
||||||
\x00\x00\x01\x93'4I\xe1\
|
\x00\x00\x01\x93'4I\xe1\
|
||||||
"
|
"
|
||||||
@@ -22,6 +22,7 @@ Item {
|
|||||||
//icon.source: "../images/addbusiness.svg"
|
//icon.source: "../images/addbusiness.svg"
|
||||||
icon.source: "qrc:/images/addbusiness.svg"
|
icon.source: "qrc:/images/addbusiness.svg"
|
||||||
icon.color: "olive"
|
icon.color: "olive"
|
||||||
|
//width: icon.width
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
flat: true
|
flat: true
|
||||||
onClicked: appLoader.source = "AddCustomer.qml"
|
onClicked: appLoader.source = "AddCustomer.qml"
|
||||||
@@ -132,18 +133,18 @@ Item {
|
|||||||
// return newWidth
|
// return newWidth
|
||||||
// }
|
// }
|
||||||
|
|
||||||
Timer
|
// Timer
|
||||||
{
|
// {
|
||||||
running: true
|
// running: true
|
||||||
interval: 3000
|
// interval: 3000
|
||||||
repeat: true
|
// repeat: true
|
||||||
onTriggered:
|
// onTriggered:
|
||||||
{
|
// {
|
||||||
//testTable.columnWidths[2] = 150
|
// //testTable.columnWidths[2] = 150
|
||||||
console.log("Timing..")
|
// console.log("Timing..")
|
||||||
testTable.forceLayout();
|
// testTable.forceLayout();
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import "qrc:/gui"
|
||||||
|
|
||||||
ColumnLayout
|
ColumnLayout
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
|
import "qrc:/gui"
|
||||||
|
|
||||||
ApplicationWindow
|
ApplicationWindow
|
||||||
{
|
{
|
||||||
|
|||||||
8
main.py
8
main.py
@@ -7,7 +7,7 @@ from PySide6.QtCore import QResource
|
|||||||
from lib.ConfigLoader import ConfigLoader
|
from lib.ConfigLoader import ConfigLoader
|
||||||
from lib.DataBase import DataBase
|
from lib.DataBase import DataBase
|
||||||
import rc_pyqcrm
|
import rc_pyqcrm
|
||||||
import rc_qml
|
import assets.rc_qml
|
||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
||||||
# [pyqcrm]
|
# [pyqcrm]
|
||||||
@@ -37,10 +37,10 @@ def testConnection():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# QResource.registerResource("qml.qrc")
|
#QResource.registerResource("rc_qml.py")
|
||||||
app = QGuiApplication(sys.argv)
|
app = QGuiApplication(sys.argv)
|
||||||
engine = QQmlApplicationEngine()
|
engine = QQmlApplicationEngine()
|
||||||
engine.addImportPath("qrc:/gui");
|
engine.addImportPath("qrc:/gui")
|
||||||
|
|
||||||
bad_config = False
|
bad_config = False
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
qml_file = Path(__file__).resolve().parent / "gui/main.qml"
|
qml_file = Path(__file__).resolve().parent / "gui/main.qml"
|
||||||
|
|
||||||
# qml_file = ":/gui/TopBar.qml"
|
#qml_file = ":/gui/main.qml"
|
||||||
|
|
||||||
config = ConfigLoader()
|
config = ConfigLoader()
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
"gui/EmployeTables.qml",
|
"gui/EmployeTables.qml",
|
||||||
"gui/AddCustomer.qml",
|
"gui/AddCustomer.qml",
|
||||||
"pyqcrm.qrc",
|
"pyqcrm.qrc",
|
||||||
"qml.qrc",
|
"assets/qml.qrc",
|
||||||
"gui/qmldir",
|
"assets/qmldir",
|
||||||
"gui/TopBar.qml"
|
"assets/TopBar.qml"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user