Skip to content

Commit

Permalink
Pyside6 imports
Browse files Browse the repository at this point in the history
  • Loading branch information
sozykinsa committed Jul 25, 2024
1 parent 118b946 commit 50c5765
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
15 changes: 12 additions & 3 deletions src/gui4dft.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,22 @@
print(str(e))
import sys
from pathlib import Path
import platform
from qtpy import PYSIDE_VERSION
from qtpy import PYQT_VERSION

from qtpy.QtCore import QCoreApplication, Qt
from qtpy.QtGui import QIcon
from qtpy.QtWidgets import QApplication
from PySide6.QtCore import QCoreApplication, Qt
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import QApplication

from qtbased.gui4dftform import MainForm

print("Python version: ", platform.python_version())
if PYSIDE_VERSION is not None:
print("PySide version: ", PYSIDE_VERSION)
if PYQT_VERSION is not None:
print("PyQt version: ", PYQT_VERSION)

sys.path.append('.')

is_with_figure = True
Expand Down
19 changes: 6 additions & 13 deletions src/qtbased/gui4dftform.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,12 @@
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import platform
from qtpy import PYSIDE_VERSION
from qtpy import PYQT_VERSION
from qtpy.QtCore import QLocale, QSettings, Qt, QSize
from qtpy.QtGui import QColor, QIcon, QImage, QKeySequence, QPixmap, QStandardItem, QStandardItemModel
from qtpy.QtWidgets import QAction, QDialog, QFileDialog, QMessageBox, QColorDialog, QHeaderView
from qtpy.QtWidgets import QDoubleSpinBox, QMainWindow, QShortcut, QTableWidgetItem, QTreeWidgetItem
from qtpy.QtWidgets import QTreeWidgetItemIterator
from PySide6.QtCore import QLocale, QSettings, Qt, QSize
from PySide6.QtGui import QAction, QColor, QIcon, QImage, QKeySequence
from PySide6.QtGui import QPixmap, QStandardItem, QStandardItemModel, QShortcut
from PySide6.QtWidgets import QDialog, QFileDialog, QMessageBox, QColorDialog, QHeaderView
from PySide6.QtWidgets import QDoubleSpinBox, QMainWindow, QTableWidgetItem, QTreeWidgetItem
from PySide6.QtWidgets import QTreeWidgetItemIterator

from ase.build import molecule, bulk

Expand Down Expand Up @@ -58,11 +56,6 @@
from ui.form import Ui_MainWindow as Ui_form

matplotlib.use('QtAgg')
print("Python version: ", platform.python_version())
if PYSIDE_VERSION is not None:
print("PySide version: ", PYSIDE_VERSION)
if PYQT_VERSION is not None:
print("PyQt version: ", PYQT_VERSION)

sys.path.append('')

Expand Down

0 comments on commit 50c5765

Please sign in to comment.