Add basic layout
This commit is contained in:
parent
a948dadc97
commit
c5145386ef
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
5
.idea/codeStyles/codeStyleConfig.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<component name="ProjectCodeStyleConfiguration">
|
||||||
|
<state>
|
||||||
|
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
|
||||||
|
</state>
|
||||||
|
</component>
|
7
.idea/discord.xml
Normal file
7
.idea/discord.xml
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DiscordProjectSettings">
|
||||||
|
<option name="show" value="PROJECT_FILES" />
|
||||||
|
<option name="description" value="" />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<settings>
|
||||||
|
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||||
|
<version value="1.0" />
|
||||||
|
</settings>
|
||||||
|
</component>
|
4
.idea/misc.xml
Normal file
4
.idea/misc.xml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectRootManager" version="2" project-jdk-name="Poetry (qrtool-ui)" project-jdk-type="Python SDK" />
|
||||||
|
</project>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/qrtool-ui.iml" filepath="$PROJECT_DIR$/.idea/qrtool-ui.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
8
.idea/qrtool-ui.iml
Normal file
8
.idea/qrtool-ui.iml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="PYTHON_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="jdk" jdkName="Poetry (qrtool-ui)" jdkType="Python SDK" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
89
poetry.lock
generated
Normal file
89
poetry.lock
generated
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pyside6"
|
||||||
|
version = "6.5.1"
|
||||||
|
description = "Python bindings for the Qt cross-platform application and UI framework"
|
||||||
|
optional = false
|
||||||
|
python-versions = "<3.12,>=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "PySide6-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:00069045509a0d7274ad9cf79bd935a126b2d73ef9f9ae81bb5d62ca8b79ea00"},
|
||||||
|
{file = "PySide6-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:0236f3cc2d293fe755be9d1c85a3d955738d3e8667d55a7e76889366b0a31122"},
|
||||||
|
{file = "PySide6-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:e1f46b654048f83a14705447564536024cbb9eccd8a60116f557a5d10725c85e"},
|
||||||
|
{file = "PySide6-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:365022e61bbcbcec9dde6a0afa5375948054edb5e38e06ddf4f902ac3dd6f50c"},
|
||||||
|
{file = "PySide6-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e45a60044ddf663920506cac6f92b6eff08b436465a752a444fed4dd35aed6eb"},
|
||||||
|
{file = "PySide6-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:e85dc1b14f9dbaa322099c56ab75c09dbe40429c6918b8a3e8901333d8f73722"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
PySide6-Addons = "6.5.1"
|
||||||
|
PySide6-Essentials = "6.5.1"
|
||||||
|
shiboken6 = "6.5.1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pyside6-addons"
|
||||||
|
version = "6.5.1"
|
||||||
|
description = "Python bindings for the Qt cross-platform application and UI framework (Addons)"
|
||||||
|
optional = false
|
||||||
|
python-versions = "<3.12,>=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "PySide6_Addons-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:fb76a18708f4f1eb6be52255e27f33ea9d4a303efd9c2ce204c6d578692de699"},
|
||||||
|
{file = "PySide6_Addons-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:dd8cb8ac79685f48e442a2683206fe75d7cb8cbeeda9e9c2504fca86932d532a"},
|
||||||
|
{file = "PySide6_Addons-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:d208d1558845c9cb1185d720f7ae0dbe584bedda9cfd163af693952d6922f70a"},
|
||||||
|
{file = "PySide6_Addons-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:48792783d43408e905c483f64cfea684f79bac1245cfb14c9d42ad2ab3a38f8f"},
|
||||||
|
{file = "PySide6_Addons-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:72a7ef1d38cc09541c8d277851c17c3b34c5fe9f766e71224122d0e382d1ac26"},
|
||||||
|
{file = "PySide6_Addons-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:68f72db78f2f0daa73382a079788cd1ce7d4f1a10ea58a69dcbf1eaa3c2699d7"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
PySide6-Essentials = "6.5.1"
|
||||||
|
shiboken6 = "6.5.1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "pyside6-essentials"
|
||||||
|
version = "6.5.1"
|
||||||
|
description = "Python bindings for the Qt cross-platform application and UI framework (Essentials)"
|
||||||
|
optional = false
|
||||||
|
python-versions = "<3.12,>=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "PySide6_Essentials-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:09884ace7574b64d33a0fe53b6185d1ffcd8cc5fa3451169b12b9ac1ea7e9951"},
|
||||||
|
{file = "PySide6_Essentials-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:b893e901724376c556abc6e4e7a88ec2b60483752c4af62692f71ae01d8c6824"},
|
||||||
|
{file = "PySide6_Essentials-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:6169239731646b81a7b325562f4e99dee4160db757370914c77030538de4dd47"},
|
||||||
|
{file = "PySide6_Essentials-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:dd2d5fe5af688090849e59ca4afa11330b9236913bf18f84825b0d074f553e16"},
|
||||||
|
{file = "PySide6_Essentials-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:475d32118242aea4236ce5a77f9eeb027a34cf05684763d24a8abe112f24029c"},
|
||||||
|
{file = "PySide6_Essentials-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:a7d2ec3ec43ca76c21bcc4a807e0e5d64a3376ba0c9fe1e90fb7cda923b6784c"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[package.dependencies]
|
||||||
|
shiboken6 = "6.5.1"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "segno"
|
||||||
|
version = "1.5.2"
|
||||||
|
description = "QR Code and Micro QR Code generator for Python 2 and Python 3"
|
||||||
|
optional = false
|
||||||
|
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
|
||||||
|
files = [
|
||||||
|
{file = "segno-1.5.2-py2.py3-none-any.whl", hash = "sha256:b17ace8171aad3987e01bb4aeadf7e0450c40674024c4c57b4da54028e55f1e9"},
|
||||||
|
{file = "segno-1.5.2.tar.gz", hash = "sha256:983424b296e62189d70fc73460cd946cf56dcbe82b9bda18c066fc1b24371cdc"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "shiboken6"
|
||||||
|
version = "6.5.1"
|
||||||
|
description = "Python/C++ bindings helper module"
|
||||||
|
optional = false
|
||||||
|
python-versions = "<3.12,>=3.7"
|
||||||
|
files = [
|
||||||
|
{file = "shiboken6-6.5.1-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:3a832110f752228e3e0c30a86a6c3fc2770148c2999c15c8fc259c03cce1e065"},
|
||||||
|
{file = "shiboken6-6.5.1-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:d9b3724772d5e98868ea6718a8d866ab3591ee3300febc74b00b32aaa0e4d295"},
|
||||||
|
{file = "shiboken6-6.5.1-cp37-abi3-win_amd64.whl", hash = "sha256:40313ea1c940e7c6fd26651b166b5ddb3db850374d29c74342a74dbba92ba61b"},
|
||||||
|
{file = "shiboken6-6.5.1-pp39-pypy39_pp73-macosx_10_9_universal2.whl", hash = "sha256:0f8744f06a8518476626230c85b1246a95f650cf739c06ee2b6f8a9124f1e8c0"},
|
||||||
|
{file = "shiboken6-6.5.1-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:8a0828ed237d16124376a97888a62ffe8243f3c623c87d204483d1d5b4511968"},
|
||||||
|
{file = "shiboken6-6.5.1-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:5619e6318228e85194cbb7966e3e05bf815305e85edf0f02af19156ba8506d5d"},
|
||||||
|
]
|
||||||
|
|
||||||
|
[metadata]
|
||||||
|
lock-version = "2.0"
|
||||||
|
python-versions = ">=3.11,<3.12"
|
||||||
|
content-hash = "a3b8fa83ec3cf9dff4098a1df846ed2b7003ea40c1eadaa83b639778672b211d"
|
18
pyproject.toml
Normal file
18
pyproject.toml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[tool.poetry]
|
||||||
|
name = "qrtool-ui"
|
||||||
|
version = "0.1.0"
|
||||||
|
description = ""
|
||||||
|
authors = ["Isaac Shoebottom <ir.shoebottom@gmail.com>"]
|
||||||
|
license = "MIT"
|
||||||
|
readme = "README.md"
|
||||||
|
packages = [{include = "qrtool_ui"}]
|
||||||
|
|
||||||
|
[tool.poetry.dependencies]
|
||||||
|
python = ">=3.11,<3.12"
|
||||||
|
segno = "^1.5.2"
|
||||||
|
pyside6 = "^6.5.1"
|
||||||
|
|
||||||
|
|
||||||
|
[build-system]
|
||||||
|
requires = ["poetry-core"]
|
||||||
|
build-backend = "poetry.core.masonry.api"
|
59
qrtool-ui/ui.py
Normal file
59
qrtool-ui/ui.py
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import sys
|
||||||
|
from PySide6.QtWidgets import QApplication, QLabel, QTabWidget, QWidget, QVBoxLayout, QMainWindow, QHBoxLayout
|
||||||
|
|
||||||
|
|
||||||
|
# TODO: Layout Example
|
||||||
|
# /---------------------------------------------------------\
|
||||||
|
# | [Generic Tab] [Wi-Fi Helper Tab] |
|
||||||
|
# | /----------------\ |
|
||||||
|
# | | | |
|
||||||
|
# | [Text Example] | | |
|
||||||
|
# | [Option Example] | | |
|
||||||
|
# | | | |
|
||||||
|
# | [Generate QR Code] \----------------/ |
|
||||||
|
# | [Save Image] [Copy to Clipboard] |
|
||||||
|
# \---------------------------------------------------------/
|
||||||
|
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
|
# Create a QMainWindow instance
|
||||||
|
window = QMainWindow()
|
||||||
|
window.setWindowTitle("QR Tool")
|
||||||
|
|
||||||
|
root = QWidget()
|
||||||
|
root.setLayout(QHBoxLayout())
|
||||||
|
|
||||||
|
# Create a QTabWidget instance
|
||||||
|
tab_widget = QTabWidget()
|
||||||
|
qr_image = QLabel("QR Image")
|
||||||
|
|
||||||
|
# Add layouts to root
|
||||||
|
root.layout().addWidget(tab_widget)
|
||||||
|
root.layout().addWidget(qr_image)
|
||||||
|
|
||||||
|
# Set central widget of QMainWindow instance
|
||||||
|
window.setCentralWidget(root)
|
||||||
|
|
||||||
|
# Add QWidget for each tab
|
||||||
|
tab_1 = QWidget()
|
||||||
|
tab_2 = QWidget()
|
||||||
|
|
||||||
|
# Set layout for each tab
|
||||||
|
tab_1.setLayout(QVBoxLayout())
|
||||||
|
tab_2.setLayout(QVBoxLayout())
|
||||||
|
|
||||||
|
# Create labels for each tab
|
||||||
|
|
||||||
|
label_1 = QLabel("This is Tab 1")
|
||||||
|
label_2 = QLabel("This is Tab 2")
|
||||||
|
|
||||||
|
# Add labels to layouts
|
||||||
|
tab_1.layout().addWidget(label_1)
|
||||||
|
tab_2.layout().addWidget(label_2)
|
||||||
|
|
||||||
|
tab_widget.addTab(tab_1, "Tab 1")
|
||||||
|
tab_widget.addTab(tab_2, "Tab 2")
|
||||||
|
|
||||||
|
|
||||||
|
window.show()
|
||||||
|
app.exec()
|
Loading…
Reference in New Issue
Block a user