Compare commits
No commits in common. "8588eda3ce4f37824d0f2a1802e234a12525c1dc" and "88425198ed2729b11532da9c88f8b910ef74f2d5" have entirely different histories.
8588eda3ce
...
88425198ed
11
README.md
11
README.md
@ -26,14 +26,3 @@ In addition to these criteria, there are the following extras:
|
|||||||
- All test cases are in `PDF` format
|
- All test cases are in `PDF` format
|
||||||
- 1 Test case is for running the app including importing database structure
|
- 1 Test case is for running the app including importing database structure
|
||||||
- 2 Test cases are for testing the app itself and all possible errors and edge cases and configurability
|
- 2 Test cases are for testing the app itself and all possible errors and edge cases and configurability
|
||||||
|
|
||||||
|
|
||||||
## Solution
|
|
||||||
My solution will use the following tech stack:
|
|
||||||
1. **Python** language
|
|
||||||
2. **MySQL** for database
|
|
||||||
3. **PySide6** for user interface made in Qt
|
|
||||||
4. **SqlAlchemy** for database management
|
|
||||||
5. **`python-dotenv`** for configurability
|
|
||||||
|
|
||||||
The problem in question will be demonstrated on a library application
|
|
BIN
db/Model.mwb
BIN
db/Model.mwb
Binary file not shown.
@ -1,11 +0,0 @@
|
|||||||
greenlet==3.1.1
|
|
||||||
mypy==1.14.1
|
|
||||||
mypy-extensions==1.0.0
|
|
||||||
PySide6==6.8.1
|
|
||||||
PySide6_Addons==6.8.1
|
|
||||||
PySide6_Essentials==6.8.1
|
|
||||||
python-dotenv==1.0.1
|
|
||||||
shiboken2==5.13.2
|
|
||||||
shiboken6==6.8.1
|
|
||||||
sqlalchemy-stubs==0.4
|
|
||||||
typing_extensions==4.12.2
|
|
14
src/app.py
14
src/app.py
@ -1,14 +0,0 @@
|
|||||||
import sys
|
|
||||||
from PySide6.QtGui import QGuiApplication
|
|
||||||
from PySide6.QtQml import QQmlApplicationEngine
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
app = QGuiApplication(sys.argv)
|
|
||||||
engine = QQmlApplicationEngine()
|
|
||||||
engine.addImportPath(sys.path[0])
|
|
||||||
engine.loadFromModule("ui", "Main")
|
|
||||||
if not engine.rootObjects():
|
|
||||||
sys.exit(-1)
|
|
||||||
exit_code = app.exec()
|
|
||||||
del engine
|
|
||||||
sys.exit(exit_code)
|
|
@ -1,12 +0,0 @@
|
|||||||
from sqlalchemy import Column, Integer, VARCHAR
|
|
||||||
from sqlalchemy.orm import relationship
|
|
||||||
from sqlalchemy.ext.declarative import declarative_base
|
|
||||||
|
|
||||||
Base = declarative_base()
|
|
||||||
|
|
||||||
class Author(Base):
|
|
||||||
__tablename__ = "author"
|
|
||||||
|
|
||||||
id = Column(Integer, primary_key=True)
|
|
||||||
first_name = Column(VARCHAR(length=50))
|
|
||||||
last_name = Column(VARCHAR(length=50))
|
|
@ -1,32 +0,0 @@
|
|||||||
import QtQuick
|
|
||||||
import QtQuick.Controls
|
|
||||||
import QtQuick.Layouts
|
|
||||||
|
|
||||||
Window {
|
|
||||||
width: 300
|
|
||||||
height: 200
|
|
||||||
visible: true
|
|
||||||
title: "Hello World"
|
|
||||||
|
|
||||||
readonly property list<string> texts: ["Hallo Welt", "Hei maailma", "Hola Mundo", "Привет мир"]
|
|
||||||
|
|
||||||
function setText() {
|
|
||||||
var i = Math.round(Math.random() * 3);
|
|
||||||
text.text = texts[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
ColumnLayout {
|
|
||||||
anchors.fill: parent
|
|
||||||
|
|
||||||
Text {
|
|
||||||
id: text
|
|
||||||
text: "Hello World"
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
}
|
|
||||||
Button {
|
|
||||||
text: "Click me"
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
onClicked: setText()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,2 +0,0 @@
|
|||||||
module Example
|
|
||||||
Main 254.0 Main.qml
|
|
Loading…
x
Reference in New Issue
Block a user