sijung21 / js06

JS-06 measures the visibility and concentration of particulate matter in the atmosphere based on the humidity and extinction coefficient of the air using a camera image.
4 stars 2 forks source link

PyQt -> PySide convertion #22

Open Oh-JongJin opened 2 years ago

Oh-JongJin commented 2 years ago

PyQt: GPL(General Public License)

PySide: LGPL(Lesser General Public License)

Oh-JongJin commented 2 years ago

Setup Ui error

from PySide6.QtGui import QPixmap, QIcon, QPainter
from PySide6.QtWidgets import QMainWindow, QWidget, QFrame, QVBoxLayout
from PySide6.QtCore import Qt. Slot, Signal, QRect, QTimer, QObject, QThread, QPointF, QDateTime, QFile
from PySide6.QtCharts import QChartView, QValueAxis, QChart, QDateTimeAxis
from PySide6.QtUiTools import QUiLoader
...
from ui_main_window import MainWindow

class JS08MainWindow(QMainWindow):
    def __init__(self, q, parent=None):
        super(JS08MainWindow, self).__init__(parent)
        self.ui = MainWindow()
        self.ui.setupUi(self)
...

In PySide6, Ui file is converted into python code and used. Ui files can be set up, but internal widgets are not accessed.

Oh-JongJin commented 2 years ago

An error that occurs when the program is terminated

QThread: Destroyed while thread is still running.

It is an error that does not occur in the existing PyQt, but occurs in PySide. The function currently using Qthread is Consumer.