Skip to content

Commit

Permalink
Update project to Qt6.
Browse files Browse the repository at this point in the history
Signed-off-by: Joey Kleingers <joey.kleingers@bluequartz.net>
  • Loading branch information
joeykleingers committed May 27, 2023
1 parent 610c258 commit 380d329
Show file tree
Hide file tree
Showing 45 changed files with 2,058 additions and 1,980 deletions.
12 changes: 6 additions & 6 deletions CMakeLists.txt
Expand Up @@ -16,20 +16,20 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

project(MetaForge VERSION 1.0.0 LANGUAGES NONE)

find_program(RCC_EXE NAMES pyside2-rcc DOC "Pyside2 RCC Executable")
find_program(UIC_EXE NAMES pyside2-uic DOC "Pyside2 UIC Executable")
find_program(RCC_EXE NAMES pyside6-rcc DOC "Pyside6 RCC Executable")
find_program(UIC_EXE NAMES pyside6-uic DOC "Pyside6 UIC Executable")

#--------------------------------------------------------------------------------------------------
# This next sections extracts out the version of Qt5 that is being used
# This next sections extracts out the version of Qt6 that is being used
#--------------------------------------------------------------------------------------------------
execute_process(
COMMAND "${RCC_EXE}" -version
OUTPUT_VARIABLE qt_version
ERROR_VARIABLE rcc_error
OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE
OUTPUT_STRIP_TRAILING_WHITESPACE
)

message(STATUS "QT Version: ${qt_version}")

# set(qt_version ${rcc_error}) # Because the output is in the error variable?
string(REPLACE " " ";" qt_version "${qt_version}") # Make a list out of the output
list(LENGTH qt_version qt_version_length) # Get the length of the list
Expand Down
2 changes: 1 addition & 1 deletion conda/meta.yaml
Expand Up @@ -17,7 +17,7 @@ requirements:
run:
- python
- requests
- pyside2
- pyside6
- dataclasses-json
- pyyaml
- Pillow>=8.2.0
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Expand Up @@ -5,7 +5,7 @@ channels:
- hyperthought
dependencies:
- python=3.8
- pyside2
- pyside6
- requests
- dataclasses-json
- Pillow>=8.2.0
Expand Down
110 changes: 89 additions & 21 deletions example_notebooks/Example1.ipynb
Expand Up @@ -10,7 +10,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -37,15 +37,15 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"# Set teh path of the file to store the JSON of the model\n",
"ez_file_path = 'example_templates/MultiPhase.ez'\n",
"ez_file_path = Path('../example_templates/MultiPhase.ez')\n",
"\n",
"# Read the MetadataModel from the json file\n",
"model = MetadataModel.from_json_file(ez_file_path)"
"model = MetadataModel.from_json_file(str(ez_file_path.absolute()))"
]
},
{
Expand All @@ -60,7 +60,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -83,9 +83,20 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Not all values that appear in the Template file were in the input data file.\n",
"SOURCE/Phases/Phase 2/MaterialName\n",
"SOURCE/Phases/Phase 2/Formula\n",
"SOURCE/Phases/Phase 2/Symmetry\n"
]
}
],
"source": [
"# Sync the the MetadataModel from the ANG header dictionary\n",
"missing_entries: List[MetadataEntry] = model.update_model_values(metadata_list)\n",
Expand All @@ -110,13 +121,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"/var/folders/cr/cwpm9_rj1m7fz04ppx5v0dwh0000gq/T/ipykernel_64980/3448695283.py:6: DeprecationWarning: Authorization is deprecated. Use TokenAuthentication instead.\n",
" auth_control = ht.auth.Authorization(accessKey, verify=False)\n"
]
}
],
"source": [
"# Use the template to upload to HyperThought\n",
"# Set your API Access Key which you would get from HyperThought Web site\n",
"accessKey = 'eyJhY2Nlc3NUb2tlbiI6ICI0M2YyMDdiYjVkY2Y0MGMxOGNiNWQ3YjE5NTdmMGE4MiIsICJyZWZyZXNoVG9rZW4iOiAiZGYwMmFlNGU4OTUwNDhmZWJjNTVkYTU3YjJmMTA0YTkiLCAiZXhwaXJlc0luIjogMjg2NiwgImV4cGlyZXNBdCI6ICIyMDIyLTA2LTMwVDExOjQ3OjU0LTA0OjAwIiwgImJhc2VVcmwiOiAiaHR0cHM6Ly9odC5ibHVlcXVhcnR6Lm5ldCIsICJjbGllbnRJZCI6ICIwODc3NjAiLCAiY2xpZW50U2VjcmV0IjogIjJjMzJhYmYyMDBlZGE3MTkxNDQxM2YyYTEwNTE5YmI0YzAzMWZmYjgxOTYwNDQ5OTVlODgxOWVjIn0='\n",
"accessKey = ''\n",
"\n",
"# Create an ht.auth.Authorization to hold the API key, and create WorkspacesAPI and FilesAPI objects\n",
"auth_control = ht.auth.Authorization(accessKey, verify=False)\n",
Expand All @@ -136,9 +156,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Project X-Caliber\n",
"joeykleingers\n",
"TestProject\n",
"BlueQuartz\n",
"Project 1\n",
"Workspace1\n"
]
}
],
"source": [
"# Print the workspace names {Optional}\n",
"for workspace in workspaces_list:\n",
Expand All @@ -147,7 +180,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -170,9 +203,21 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 11,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'name': 'Another Folder in Project', 'ftype': 'Folder', 'path': ',', 'path_string': '/Another Folder in Project/', 'size': 339522514, 'items': 12, 'pk': 'b39dd8fd-cc7d-4a13-8f80-551ff19d542c', 'metadata': [], 'pid': 'd1d794ee-b0dd-409c-affe-1feb003bf853', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/b39dd8fd-cc7d-4a13-8f80-551ff19d542c', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-24T14:39:57.067881-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-24T14:39:57.067881-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/b39dd8fd-cc7d-4a13-8f80-551ff19d542c/', 'pid': '/api/files/v1/pid/d1d794ee-b0dd-409c-affe-1feb003bf853/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=b39dd8fd-cc7d-4a13-8f80-551ff19d542c'}}\n",
"{'name': 'First Folder in Project', 'ftype': 'Folder', 'path': ',', 'path_string': '/First Folder in Project/', 'size': 7147903, 'items': 3, 'pk': '9404aae3-6a3c-4518-8cda-921d49bd990c', 'metadata': [], 'pid': '91d317fd-2a2d-4487-985b-7136a5b3eabd', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/9404aae3-6a3c-4518-8cda-921d49bd990c', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-24T14:39:48.22148-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-24T14:39:48.22148-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/9404aae3-6a3c-4518-8cda-921d49bd990c/', 'pid': '/api/files/v1/pid/91d317fd-2a2d-4487-985b-7136a5b3eabd/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=9404aae3-6a3c-4518-8cda-921d49bd990c'}}\n",
"{'name': 'New Folder', 'ftype': 'Folder', 'path': ',', 'path_string': '/New Folder/', 'size': 88199456, 'items': 4, 'pk': 'af2bb85a-c714-457f-aaf8-967162397d91', 'metadata': [], 'pid': '581e073e-5a29-4185-9391-376eee20983b', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/af2bb85a-c714-457f-aaf8-967162397d91', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-25T12:15:31.641536-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-25T12:15:31.641536-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/af2bb85a-c714-457f-aaf8-967162397d91/', 'pid': '/api/files/v1/pid/581e073e-5a29-4185-9391-376eee20983b/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=af2bb85a-c714-457f-aaf8-967162397d91'}}\n",
"{'name': 'SmallIN100', 'ftype': 'Folder', 'path': ',', 'path_string': '/SmallIN100/', 'size': 6611617, 'items': 2, 'pk': '1aa9022b-b770-4dec-9fde-fbe982142b59', 'metadata': [], 'pid': '1d1db894-1e5b-4993-afd2-57e148efe4d8', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/1aa9022b-b770-4dec-9fde-fbe982142b59', 'workspaceName': 'Project X-Caliber', 'createdOn': '2023-05-25T21:45:14.160093-04:00', 'createdBy': 'Joey Kleingers', 'modifiedOn': '2023-05-25T21:45:14.160093-04:00', 'modifiedBy': 'Joey Kleingers', 'resources': {'id': '/api/files/v1/1aa9022b-b770-4dec-9fde-fbe982142b59/', 'pid': '/api/files/v1/pid/1d1db894-1e5b-4993-afd2-57e148efe4d8/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=1aa9022b-b770-4dec-9fde-fbe982142b59'}}\n",
"{'name': 'Unit_Test', 'ftype': 'Folder', 'path': ',', 'path_string': '/Unit_Test/', 'size': 10454268, 'items': 4, 'pk': '8d06f8aa-7759-4bf1-a357-d32170bf8a57', 'metadata': [], 'pid': '7fc61e92-73d4-49f8-87b4-e53241c7825d', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/8d06f8aa-7759-4bf1-a357-d32170bf8a57', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-28T11:48:26.428518-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-28T11:48:26.428518-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/8d06f8aa-7759-4bf1-a357-d32170bf8a57/', 'pid': '/api/files/v1/pid/7fc61e92-73d4-49f8-87b4-e53241c7825d/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=8d06f8aa-7759-4bf1-a357-d32170bf8a57'}}\n"
]
}
],
"source": [
"# Get the file/folder list from the project listed in the previous code\n",
"workspace_folder_list = files_api.get_from_location(space_id=workspace_id,\n",
Expand All @@ -186,15 +231,29 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 13,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Checking if remote folder Unit_Test exists\n",
"{'name': 'Another Folder in Project', 'ftype': 'Folder', 'path': ',', 'path_string': '/Another Folder in Project/', 'size': 339522514, 'items': 12, 'pk': 'b39dd8fd-cc7d-4a13-8f80-551ff19d542c', 'metadata': [], 'pid': 'd1d794ee-b0dd-409c-affe-1feb003bf853', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/b39dd8fd-cc7d-4a13-8f80-551ff19d542c', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-24T14:39:57.067881-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-24T14:39:57.067881-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/b39dd8fd-cc7d-4a13-8f80-551ff19d542c/', 'pid': '/api/files/v1/pid/d1d794ee-b0dd-409c-affe-1feb003bf853/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=b39dd8fd-cc7d-4a13-8f80-551ff19d542c'}}\n",
"{'name': 'First Folder in Project', 'ftype': 'Folder', 'path': ',', 'path_string': '/First Folder in Project/', 'size': 7147903, 'items': 3, 'pk': '9404aae3-6a3c-4518-8cda-921d49bd990c', 'metadata': [], 'pid': '91d317fd-2a2d-4487-985b-7136a5b3eabd', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/9404aae3-6a3c-4518-8cda-921d49bd990c', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-24T14:39:48.22148-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-24T14:39:48.22148-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/9404aae3-6a3c-4518-8cda-921d49bd990c/', 'pid': '/api/files/v1/pid/91d317fd-2a2d-4487-985b-7136a5b3eabd/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=9404aae3-6a3c-4518-8cda-921d49bd990c'}}\n",
"{'name': 'New Folder', 'ftype': 'Folder', 'path': ',', 'path_string': '/New Folder/', 'size': 88199456, 'items': 4, 'pk': 'af2bb85a-c714-457f-aaf8-967162397d91', 'metadata': [], 'pid': '581e073e-5a29-4185-9391-376eee20983b', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/af2bb85a-c714-457f-aaf8-967162397d91', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-25T12:15:31.641536-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-25T12:15:31.641536-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/af2bb85a-c714-457f-aaf8-967162397d91/', 'pid': '/api/files/v1/pid/581e073e-5a29-4185-9391-376eee20983b/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=af2bb85a-c714-457f-aaf8-967162397d91'}}\n",
"{'name': 'SmallIN100', 'ftype': 'Folder', 'path': ',', 'path_string': '/SmallIN100/', 'size': 6611617, 'items': 2, 'pk': '1aa9022b-b770-4dec-9fde-fbe982142b59', 'metadata': [], 'pid': '1d1db894-1e5b-4993-afd2-57e148efe4d8', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/1aa9022b-b770-4dec-9fde-fbe982142b59', 'workspaceName': 'Project X-Caliber', 'createdOn': '2023-05-25T21:45:14.160093-04:00', 'createdBy': 'Joey Kleingers', 'modifiedOn': '2023-05-25T21:45:14.160093-04:00', 'modifiedBy': 'Joey Kleingers', 'resources': {'id': '/api/files/v1/1aa9022b-b770-4dec-9fde-fbe982142b59/', 'pid': '/api/files/v1/pid/1d1db894-1e5b-4993-afd2-57e148efe4d8/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=1aa9022b-b770-4dec-9fde-fbe982142b59'}}\n",
"{'name': 'Unit_Test', 'ftype': 'Folder', 'path': ',', 'path_string': '/Unit_Test/', 'size': 10454268, 'items': 4, 'pk': '8d06f8aa-7759-4bf1-a357-d32170bf8a57', 'metadata': [], 'pid': '7fc61e92-73d4-49f8-87b4-e53241c7825d', 'distributionLevel': 'Distribution A', 'exportControl': '', 'canonicalUri': '/files/filesystementry/8d06f8aa-7759-4bf1-a357-d32170bf8a57', 'workspaceName': 'Project X-Caliber', 'createdOn': '2021-06-28T11:48:26.428518-04:00', 'createdBy': 'Mike Jackson', 'modifiedOn': '2021-06-28T11:48:26.428518-04:00', 'modifiedBy': 'Mike Jackson', 'resources': {'id': '/api/files/v1/8d06f8aa-7759-4bf1-a357-d32170bf8a57/', 'pid': '/api/files/v1/pid/7fc61e92-73d4-49f8-87b4-e53241c7825d/', 'workspace': '/api/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/', 'workspaceView': '/workspace/285e6bc0-1fe2-4cc1-8585-417ab10973a0/detail/', 'generateDownloadUrl': '/api/files/generate-download-url/?id=8d06f8aa-7759-4bf1-a357-d32170bf8a57'}}\n",
"name: Unit_Test UUID: 8d06f8aa-7759-4bf1-a357-d32170bf8a57\n"
]
}
],
"source": [
"# Set the remote directory to create.\n",
"remote_exists = False\n",
"remote_folder_name = \"Unit_Test\"\n",
"remote_folder_uuid = \"\"\n",
"print(\"Checking if remote folder {remote_folder_name} exists\")\n",
"print(f\"Checking if remote folder {remote_folder_name} exists\")\n",
"for f in workspace_folder_list:\n",
" print(f)\n",
" if f[\"name\"] == remote_folder_name:\n",
Expand Down Expand Up @@ -233,13 +292,22 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 14,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Slice_1.ang: b55925f5-dfc3-46ac-9535-30e736eed814\n",
"Upload completed\n"
]
}
],
"source": [
"# Extract the Meta-Data from the Template/Model\n",
"missing_entries = []\n",
"metadata = ht_utilities.ezmodel_to_ht_metadata(model=model, missing_entries=missing_entries, metadata_file_chosen=True)\n",
"metadata = metaforge.utilities.ht_utilities.ezmodel_to_ht_metadata(model=model, missing_entries=missing_entries, metadata_file_chosen=True)\n",
"\n",
"# Pick your data files to upload\n",
"filelist = f'{data_prefix}DREAM3D_Data/Data/SmallIN100/Slice_1.ang'\n",
Expand Down
13 changes: 3 additions & 10 deletions metaforge/__main__.py
Expand Up @@ -5,15 +5,8 @@
import platform
from pathlib import Path

# This is necessary for MacOS 11.0 (10.16) and up to launch the application properly
if platform.system() == 'Darwin':
v, _, _ = platform.mac_ver()
v = float('.'.join(v.split('.')[:2]))
if v >= 10.16:
os.environ["QT_MAC_WANTS_LAYER"] = "1"

from PySide2.QtWidgets import QApplication
from PySide2.QtGui import QIcon
from PySide6.QtWidgets import QApplication
from PySide6.QtGui import QIcon

from metaforge.widgets.mainwindowimpl import MainWindow

Expand All @@ -40,7 +33,7 @@ def main():
window = MainWindow(app)
window.show()

app.exec_()
app.exec()

if __name__ == "__main__":
sys.exit(main())
6 changes: 3 additions & 3 deletions metaforge/common/metaforgestyledatahelper.py
Expand Up @@ -4,9 +4,9 @@

from typing import List

from PySide2.QtWidgets import QApplication
from PySide2.QtGui import QFontDatabase
from PySide2.QtCore import QObject, QFileSystemWatcher, Qt, Signal, Slot
from PySide6.QtWidgets import QApplication
from PySide6.QtGui import QFontDatabase
from PySide6.QtCore import QObject, QFileSystemWatcher, Qt, Signal, Slot

class MetaForgeStyleDataHelper(QObject):

Expand Down
16 changes: 6 additions & 10 deletions metaforge/delegates/checkboxdelegate.py
@@ -1,17 +1,13 @@
# This Python file uses the following encoding: utf-8
from PySide2.QtCore import *
from PySide2.QtWidgets import QStyle, QStyledItemDelegate, QStyleOptionViewItem, QUndoStack
import PySide2.QtCore
from PySide2.QtCore import Qt, QEvent
from PySide6.QtCore import *
from PySide6.QtWidgets import QStyle, QStyledItemDelegate, QStyleOptionViewItem
from PySide6.QtGui import QUndoStack
import PySide6.QtCore
from PySide6.QtCore import Qt, QEvent

from metaforge.undo_stack_commands.toggle_parser_command import ToggleParserCommand

qt_version = PySide2.QtCore.__version_info__

if qt_version[1] == 12:
from metaforge.widgets.generated_5_12.resources_rc import *
elif qt_version[1] == 15:
from metaforge.widgets.generated_5_15.resources_rc import *
from metaforge.widgets.generated_6_5.resources_rc import *


class CheckBoxDelegate(QStyledItemDelegate):
Expand Down
15 changes: 6 additions & 9 deletions metaforge/delegates/trashdelegate.py
@@ -1,15 +1,12 @@
# This Python file uses the following encoding: utf-8
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
import PySide2.QtCore
from PySide6.QtCore import *
from PySide6.QtGui import *
from PySide6.QtWidgets import *
import PySide6.QtCore

qt_version = PySide2.QtCore.__version_info__
qt_version = PySide6.QtCore.__version_info__

if qt_version[1] == 12:
from metaforge.widgets.generated_5_12.resources_rc import *
elif qt_version[1] == 15:
from metaforge.widgets.generated_5_15.resources_rc import *
from metaforge.widgets.generated_6_5.resources_rc import *
from metaforge.common.metaforgestyledatahelper import MetaForgeStyleDataHelper

class TrashDelegate(QStyledItemDelegate):
Expand Down
6 changes: 3 additions & 3 deletions metaforge/delegates/usefiledelegate.py
@@ -1,7 +1,7 @@
# This Python file uses the following encoding: utf-8
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide6.QtCore import *
from PySide6.QtGui import *
from PySide6.QtWidgets import *

from metaforge.common.metaforgestyledatahelper import MetaForgeStyleDataHelper

Expand Down
2 changes: 1 addition & 1 deletion metaforge/ht_helpers/ht_token_verifier.py
@@ -1,5 +1,5 @@
# This Python file uses the following encoding: utf-8
from PySide2.QtCore import QDateTime, QTimer, QObject, Slot, Qt, Signal
from PySide6.QtCore import QDateTime, QTimer, QObject, Slot, Qt, Signal

class HyperThoughtTokenVerifier(QObject):

Expand Down

0 comments on commit 380d329

Please sign in to comment.